Carl Dong
7 years ago
committed by
Rusty Russell
261 changed files with 4 additions and 75294 deletions
@ -1,59 +0,0 @@ |
|||||
bld |
|
||||
src/*.pyc |
|
||||
src/test/*.pyc |
|
||||
src/test/__pycache__/ |
|
||||
*~ |
|
||||
*.class |
|
||||
*.gcno |
|
||||
*.gcda |
|
||||
*.o |
|
||||
*.lo |
|
||||
*.la |
|
||||
*.deps |
|
||||
*.dirstamp |
|
||||
*.libs |
|
||||
*.venv |
|
||||
Makefile |
|
||||
Makefile.in |
|
||||
aclocal.m4 |
|
||||
autom4te.cache/ |
|
||||
build |
|
||||
compile |
|
||||
config.guess |
|
||||
config.log |
|
||||
config.status |
|
||||
config.sub |
|
||||
configure |
|
||||
depcomp |
|
||||
dist |
|
||||
install-sh |
|
||||
libtool |
|
||||
ltmain.sh |
|
||||
missing |
|
||||
src/*~ |
|
||||
src/lcov* |
|
||||
src/Makefile |
|
||||
src/Makefile.in |
|
||||
src/config.h |
|
||||
src/config.h.in |
|
||||
src/stamp-h1 |
|
||||
src/test/Makefile |
|
||||
src/test/Makefile.in |
|
||||
src/test_clear* |
|
||||
src/test-suite.log |
|
||||
src/swig_java/swig_java_wrap.c |
|
||||
src/swig_java/*.java |
|
||||
src/swig_java/*.jar |
|
||||
src/swig_java/src/com/blockstream/libwally |
|
||||
src/swig_python/swig_python_wrap.c |
|
||||
src/swig_python/wallycore/__init__.py |
|
||||
src/swig_python/wallycore/wallycore.egg-info |
|
||||
tools/build-aux/m4/l*.m4 |
|
||||
tools/build-aux/test-driver |
|
||||
src/secp256k1/test-suite.log |
|
||||
src/secp256k1/tests.log |
|
||||
src/secp256k1/tests.trs |
|
||||
wallycore.egg-info/ |
|
||||
wally*.gz |
|
||||
wally*.sha256 |
|
||||
wally*.asc |
|
@ -1,43 +0,0 @@ |
|||||
git: |
|
||||
depth: 5 |
|
||||
branches: |
|
||||
only: |
|
||||
- master |
|
||||
language: c |
|
||||
sudo: required |
|
||||
os: |
|
||||
- linux |
|
||||
- osx |
|
||||
dist: trusty |
|
||||
compiler: |
|
||||
- clang |
|
||||
- gcc |
|
||||
addons: |
|
||||
apt: |
|
||||
packages: |
|
||||
- python |
|
||||
- python-dev |
|
||||
- python3 |
|
||||
- python3-dev |
|
||||
- swig |
|
||||
- gcc-multilib |
|
||||
matrix: |
|
||||
include: |
|
||||
- os: linux |
|
||||
compiler: clang |
|
||||
env: HOST=i686-linux-gnu |
|
||||
- os: linux |
|
||||
compiler: gcc |
|
||||
env: HOST=i686-linux-gnu |
|
||||
- compiler: gcc |
|
||||
os: linux |
|
||||
env: PYTHON_VERSION=3.4 |
|
||||
|
|
||||
before_script: |
|
||||
- ./tools/cleanup.sh && ./tools/autogen.sh |
|
||||
before_install: |
|
||||
- ./tools/travis_install.sh |
|
||||
script: |
|
||||
- ./tools/travis_build.sh |
|
||||
notifications: |
|
||||
email: false |
|
@ -1 +0,0 @@ |
|||||
Stolen from 3b025127cbf11912f8b95e7ff3c905d74e8433ce, with hmac_256 -> hmac_256_internal to avoid name clash |
|
@ -1,13 +0,0 @@ |
|||||
|
|
||||
Use the following commands to build and install the library: |
|
||||
|
|
||||
$ ./tools/autogen.sh |
|
||||
$ ./configure [options] |
|
||||
$ make |
|
||||
$ make install |
|
||||
|
|
||||
Note that ./configure --help can be used to determine configuration options. |
|
||||
|
|
||||
To fully clean the library, run: |
|
||||
|
|
||||
$ ./tools/cleanup.sh |
|
@ -1,23 +0,0 @@ |
|||||
Note: the modules in the src/ccan/ directory have their own licenses, but |
|
||||
except where noted in an individual source file, the rest of the code is |
|
||||
covered by the following (BSD-MIT) license: |
|
||||
|
|
||||
Copyright Jon Griffiths (Blockstream) 2016. |
|
||||
|
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
|
||||
of this software and associated documentation files (the "Software"), to deal |
|
||||
in the Software without restriction, including without limitation the rights |
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
||||
copies of the Software, and to permit persons to whom the Software is |
|
||||
furnished to do so, subject to the following conditions: |
|
||||
|
|
||||
The above copyright notice and this permission notice shall be included in |
|
||||
all copies or substantial portions of the Software. |
|
||||
|
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
||||
THE SOFTWARE. |
|
@ -1,3 +0,0 @@ |
|||||
ACLOCAL_AMFLAGS = -I tools/build-aux/m4 |
|
||||
AUTOMAKE_OPTIONS = foreign |
|
||||
SUBDIRS = src |
|
@ -1,111 +0,0 @@ |
|||||
# libwally-core |
|
||||
|
|
||||
Wally is a collection of useful primitives for cryptocurrency wallets. |
|
||||
|
|
||||
Note that the library is currently pre-release and so the API may change |
|
||||
without notice. |
|
||||
|
|
||||
Please report bugs and submit patches to https://github.com/jgriffiths/libwally-core. |
|
||||
|
|
||||
[![Build Status](https://travis-ci.org/jgriffiths/libwally-core.svg?branch=master)](https://travis-ci.org/jgriffiths/libwally-core) |
|
||||
|
|
||||
## Platforms |
|
||||
|
|
||||
Wally currently builds on all linux and OSX platforms as well as all supported |
|
||||
Android NDK targets. Bindings for Python and Java are included. |
|
||||
|
|
||||
Windows support and further language bindings such as JavaScript are planned. |
|
||||
|
|
||||
## Building |
|
||||
|
|
||||
``` |
|
||||
$ ./tools/autogen.sh |
|
||||
$ ./configure <options - see below> |
|
||||
$ make |
|
||||
$ make check |
|
||||
``` |
|
||||
|
|
||||
### configure options |
|
||||
|
|
||||
- `--enable-debug`. Enables debugging information and disables compiler |
|
||||
optimisations (default: no). |
|
||||
- `--enable-export-all`. Export all functions from the wally shared library. |
|
||||
Ordinarily only API functions are exported. (default: no). Enable this |
|
||||
if you want to test the internal functions of the library or are planning |
|
||||
to submit patches. |
|
||||
- `--enable-swig-python`. Enable the [SWIG](http://www.swig.org/) Python |
|
||||
interface. The resulting shared library can be imported from Python using |
|
||||
the generated interface file `src/swig_python/wallycore/wallycore.py`. (default: no). |
|
||||
- `--enable-swig-java`. Enable the [SWIG](http://www.swig.org/) Java (JNI) |
|
||||
interface. After building, see `src/swig_java/src/com/blockstream/libwally/Wally.java` |
|
||||
for the Java interface definition (default: no). |
|
||||
- `--enable-coverage`. Enables code coverage (default: no) Note that you will |
|
||||
need [lcov](http://ltp.sourceforge.net/coverage/lcov.php) installed to |
|
||||
build with this option enabled and generate coverage reports. |
|
||||
|
|
||||
NOTE: If you wish to run the Python tests you currently need to pass |
|
||||
the `--enable-swig-python` option. This requirement will be removed |
|
||||
in a future version. |
|
||||
|
|
||||
### Recommended development configure options |
|
||||
|
|
||||
``` |
|
||||
$ ./configure --enable-debug --enable-export-all --enable-swig-python --enable-coverage |
|
||||
``` |
|
||||
|
|
||||
### Python |
|
||||
|
|
||||
For python development, you can build and install wally using: |
|
||||
|
|
||||
``` |
|
||||
$ python setup.py install |
|
||||
``` |
|
||||
|
|
||||
It is suggested you only install this way into a virtualenv while the library |
|
||||
is under heavy development. |
|
||||
|
|
||||
## Cleaning |
|
||||
|
|
||||
``` |
|
||||
$ ./tools/cleanup.sh |
|
||||
``` |
|
||||
|
|
||||
## Submitting patches |
|
||||
|
|
||||
Please use pull requests on github to submit. Before producing your patch you |
|
||||
should format your changes using [uncrustify](https://github.com/uncrustify/uncrustify.git) |
|
||||
version 0.60 or later. The script `./tools/uncrustify` will reformat all C |
|
||||
sources in the library as needed, with the currently chosen uncrustify options. |
|
||||
|
|
||||
The version of uncrustify in Debian is unfortunately out of date and buggy. If |
|
||||
you are using Debian this means you will need to download and build uncrustify |
|
||||
from source using something like: |
|
||||
|
|
||||
``` |
|
||||
$ git clone --depth 1 https://github.com/uncrustify/uncrustify.git |
|
||||
$ cd uncrustify |
|
||||
$ ./autogen.sh |
|
||||
$ ./configure |
|
||||
$ make |
|
||||
$ sudo make install |
|
||||
``` |
|
||||
|
|
||||
You should also make sure the existing tests pass and if possible write tests |
|
||||
covering any new functionality, following the existing style. |
|
||||
|
|
||||
## Generating a coverage report |
|
||||
|
|
||||
To generate an HTML coverage report, use: |
|
||||
|
|
||||
``` |
|
||||
$ ./tools/cleanup.sh |
|
||||
$ ./tools/autogen.sh |
|
||||
$ ./configure --enable-debug --enable-export-all --enable-swig-python --enable-swig-java --enable-coverage |
|
||||
$ make |
|
||||
$ ./tools/coverage.sh clean |
|
||||
$ make check |
|
||||
$ ./tools/coverage.sh |
|
||||
``` |
|
||||
|
|
||||
The coverage report can then be viewed at `src/lcov/index.html`. Patches to |
|
||||
increase the test coverage are welcome. |
|
@ -1,268 +0,0 @@ |
|||||
AC_PREREQ([2.60]) |
|
||||
AC_INIT([libwallycore],[0.1]) |
|
||||
AC_CONFIG_AUX_DIR([tools/build-aux]) |
|
||||
AC_CONFIG_MACRO_DIR([tools/build-aux/m4]) |
|
||||
AC_CONFIG_SRCDIR([src/mnemonic.h]) |
|
||||
AC_CONFIG_HEADERS([src/config.h]) |
|
||||
AC_CANONICAL_HOST |
|
||||
AH_TOP([#ifndef LIBWALLYCORE_CONFIG_H |
|
||||
#define LIBWALLYCORE_CONFIG_H]) |
|
||||
AH_BOTTOM([#include "ccan_config.h" |
|
||||
#endif /*LIBWALLYCORE_CONFIG_H*/]) |
|
||||
|
|
||||
LDPATH_VAR=LD_LIBRARY_PATH |
|
||||
case $host_os in |
|
||||
*darwin*) |
|
||||
is_osx="yes" |
|
||||
LDPATH_VAR=DYLD_LIBRARY_PATH |
|
||||
;; |
|
||||
esac |
|
||||
AM_CONDITIONAL([IS_OSX], [test "x$is_osx" == "xyes"]) |
|
||||
AC_SUBST([LDPATH_VAR]) |
|
||||
|
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects]) |
|
||||
LT_INIT([disable-static]) |
|
||||
|
|
||||
AC_PROG_CC |
|
||||
|
|
||||
# Prefer gccs ar/ranlib as they handle flto files properly |
|
||||
AC_CHECK_PROG(HAVE_GCC_AR,gcc-ar,yes,no) |
|
||||
if test "x$HAVE_GCC_AR" == "xyes"; then |
|
||||
AR=gcc-ar |
|
||||
AC_SUBST([AR]) |
|
||||
fi |
|
||||
|
|
||||
AC_CHECK_PROG(HAVE_GCC_RANLIB,gcc-ranlib,yes,no) |
|
||||
if test "x$HAVE_GCC_RANLIB" == "xyes"; then |
|
||||
RANLIB=gcc-ranlib |
|
||||
AC_SUBST([RANLIB]) |
|
||||
fi |
|
||||
|
|
||||
GNU_SED=sed |
|
||||
AC_CHECK_PROG(HAVE_GSED,gsed,yes,no) |
|
||||
if test "x$HAVE_GSED" == "xyes"; then |
|
||||
GNU_SED=gsed |
|
||||
else |
|
||||
if test "x$is_osx" == "xyes"; then |
|
||||
AC_MSG_ERROR([gsed must be available to build this library]) |
|
||||
fi |
|
||||
fi |
|
||||
AC_SUBST([GNU_SED]) |
|
||||
|
|
||||
# |
|
||||
# C facilities |
|
||||
# |
|
||||
AC_ARG_ENABLE(debug, |
|
||||
AS_HELP_STRING([--enable-debug],[enable debugging (default: no)]), |
|
||||
[debug=$enableval], [debug=no]) |
|
||||
AC_ARG_ENABLE(coverage, |
|
||||
AS_HELP_STRING([--enable-coverage],[enable code coverage (default: no)]), |
|
||||
[coverage=$enableval], [coverage=no]) |
|
||||
|
|
||||
CFLAGS=`echo $CFLAGS | $GNU_SED -e 's/-O2//g' | $GNU_SED -e 's/-g//g'` |
|
||||
|
|
||||
AC_C_BIGENDIAN() |
|
||||
AC_C_INLINE |
|
||||
AC_TYPE_SIZE_T |
|
||||
AC_TYPE_UINT64_T |
|
||||
AC_TYPE_UINT32_T |
|
||||
AC_TYPE_UINT16_T |
|
||||
AC_TYPE_UINT8_T |
|
||||
|
|
||||
AM_CFLAGS= |
|
||||
if test "x$debug" == "xyes"; then |
|
||||
# Make debugging easier, leave assertions in |
|
||||
AX_CHECK_COMPILE_FLAG([-O0], [AM_CFLAGS="$AM_CFLAGS -O0"]) |
|
||||
AX_CHECK_COMPILE_FLAG([-ggdb], [AM_CFLAGS="$AM_CFLAGS -ggdb"]) |
|
||||
AX_CHECK_LINK_FLAG([-O0], [LDFLAGS="$LDFLAGS -O0"]) |
|
||||
AX_CHECK_LINK_FLAG([-ggdb], [LDFLAGS="$LDFLAGS -ggdb"]) |
|
||||
if test "x$coverage" == "xyes"; then |
|
||||
AX_CHECK_COMPILE_FLAG([-fprofile-arcs -ftest-coverage], [AM_CFLAGS="$AM_CFLAGS -fprofile-arcs -ftest-coverage"]) |
|
||||
AX_CHECK_LINK_FLAG([-lgcov], [LDFLAGS="$LDFLAGS -lgcov"]) |
|
||||
fi |
|
||||
else |
|
||||
# Optimise and harden if we can |
|
||||
AX_CHECK_COMPILE_FLAG([-O3], [AM_CFLAGS="$AM_CFLAGS -O3"]) |
|
||||
AX_CHECK_COMPILE_FLAG([-D_FORTIFY_SOURCE=1], [AM_CFLAGS="$AM_CFLAGS -D_FORTIFY_SOURCE=1"]) |
|
||||
AX_CHECK_COMPILE_FLAG([-fstack-protector-strong], [AM_CFLAGS="$AM_CFLAGS -fstack-protector-strong"]) |
|
||||
AX_CHECK_COMPILE_FLAG([-DNDEBUG=1], [AM_CFLAGS="$AM_CFLAGS -DNDEBUG=1"]) |
|
||||
AX_CHECK_LINK_FLAG([-O3], [LDFLAGS="$LDFLAGS -O3"]) |
|
||||
AX_CHECK_LINK_FLAG([-flto], [LDFLAGS="$LDFLAGS -flto"]) |
|
||||
AX_CHECK_LINK_FLAG([-flto], [AM_CFLAGS="$AM_CFLAGS -flto"]) |
|
||||
AX_CHECK_LINK_FLAG([-Wl,-z,relro], [LDFLAGS="$LDFLAGS -Wl,-z,relro"]) |
|
||||
fi |
|
||||
|
|
||||
# -flax-vector-conversions is needed for our arm assembly |
|
||||
AX_CHECK_COMPILE_FLAG([-flax-vector-conversions], [AM_CFLAGS="$AM_CFLAGS -flax-vector-conversions"]) |
|
||||
|
|
||||
AX_CHECK_COMPILE_FLAG([-Wall], [AM_CFLAGS="$AM_CFLAGS -Wall"]) |
|
||||
AX_CHECK_COMPILE_FLAG([-Wextra], [AM_CFLAGS="$AM_CFLAGS -Wextra"]) |
|
||||
AX_CHECK_COMPILE_FLAG([-Wpedantic], [AM_CFLAGS="$AM_CFLAGS -Wpedantic"]) |
|
||||
AX_CHECK_COMPILE_FLAG([-Wcast-align], [AM_CFLAGS="$AM_CFLAGS -Wcast-align"]) |
|
||||
AX_CHECK_COMPILE_FLAG([-Wnested-externs], [AM_CFLAGS="$AM_CFLAGS -Wnested-externs"]) |
|
||||
AX_CHECK_COMPILE_FLAG([-Wshadow], [AM_CFLAGS="$AM_CFLAGS -Wshadow"]) |
|
||||
AX_CHECK_COMPILE_FLAG([-Wstrict-prototypes], [AM_CFLAGS="$AM_CFLAGS -Wstrict-prototypes"]) |
|
||||
AX_CHECK_COMPILE_FLAG([-Wno-unused-function], [AM_CFLAGS="$AM_CFLAGS -Wno-unused-function"]) |
|
||||
AX_CHECK_COMPILE_FLAG([-Wno-long-long], [AM_CFLAGS="$AM_CFLAGS -Wno-long-long"]) |
|
||||
AX_CHECK_COMPILE_FLAG([-Wno-overlength-strings], [AM_CFLAGS="$AM_CFLAGS -Wno-overlength-strings"]) |
|
||||
AX_CHECK_COMPILE_FLAG([-Wformat], [AM_CFLAGS="$AM_CFLAGS -Wformat"]) |
|
||||
AX_CHECK_COMPILE_FLAG([-Wformat-security], [AM_CFLAGS="$AM_CFLAGS -Wformat-security"]) |
|
||||
AX_CHECK_COMPILE_FLAG([-Wformat-nonliteral], [AM_CFLAGS="$AM_CFLAGS -Wformat-nonliteral"]) |
|
||||
AX_CHECK_COMPILE_FLAG([-fno-strict-aliasing], [NOALIAS_CFLAGS="-fno-strict-aliasing"]) |
|
||||
AC_SUBST([NOALIAS_CFLAGS]) |
|
||||
|
|
||||
# Under OSX the compiler accepts this flag but the linker then fails. |
|
||||
if test "x$is_osx" != "xyes"; then |
|
||||
AX_CHECK_COMPILE_FLAG([-Wl,--whole-archive], [whole_archive=yes]) |
|
||||
fi |
|
||||
|
|
||||
# SWIG versions vary in generated code quality; skip warnings |
|
||||
SWIG_WARN_CFLAGS="-fno-strict-aliasing" |
|
||||
AX_CHECK_COMPILE_FLAG([-Wno-shadow], [SWIG_WARN_CFLAGS="$SWIG_WARN_CFLAGS -Wno-shadow"]) |
|
||||
AX_CHECK_COMPILE_FLAG([-Wno-self-assign], [SWIG_WARN_CFLAGS="$SWIG_WARN_CFLAGS -Wno-self-assign"]) |
|
||||
AX_CHECK_COMPILE_FLAG([-Wno-missing-field-initializers], [SWIG_WARN_CFLAGS="$SWIG_WARN_CFLAGS -Wno-missing-field-initializers"]) |
|
||||
AC_SUBST([SWIG_WARN_CFLAGS]) |
|
||||
|
|
||||
AC_ARG_ENABLE(export-all, |
|
||||
AS_HELP_STRING([--enable-export-all],[export all functions (for testing, default: no)]), |
|
||||
[export_all=$enableval], [export_all=no]) |
|
||||
AM_CONDITIONAL([EXPORT_ALL], [test "x$export_all" == "xyes"]) |
|
||||
|
|
||||
if test "x$export_all" != "xyes"; then |
|
||||
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [AM_CFLAGS="$AM_CFLAGS -fvisibility=hidden"]) |
|
||||
fi |
|
||||
|
|
||||
# Assume we have no unaligned access if cross-compiling |
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([int main(void){static int a[2];return *((int*)(((char*)a)+1)) != 0;}])], |
|
||||
[AC_DEFINE([HAVE_UNALIGNED_ACCESS], 1, [Define if we have unaligned access])],,[foo=1]) |
|
||||
|
|
||||
if test "x$is_osx" != "xyes"; then |
|
||||
# Assume we are using gcc (i.e. have this attribute) if cross-compiling |
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([extern int foo(int) __attribute__((weak)); int main(void){return 0;}])], |
|
||||
[AC_DEFINE([HAVE_ATTRIBUTE_WEAK], 1, [Define if we have __attribute__((weak))])]) |
|
||||
fi |
|
||||
|
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/mman.h>]],[[mmap(0,0,0,0,0,0)]])], |
|
||||
[AC_DEFINE(HAVE_MMAP, 1, [Define if we have mmap])]) |
|
||||
|
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>]],[[return posix_memalign(NULL,0,0)]])], |
|
||||
[AC_DEFINE(HAVE_POSIX_MEMALIGN, 1, [Define if we have posix_memalign])]) |
|
||||
|
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]],[[int x[1]; memset_s(x, 1, 0, 1)]])], |
|
||||
[AC_DEFINE(HAVE_MEMSET_S, 1, [Define if we have memset_s])]) |
|
||||
|
|
||||
AC_CHECK_HEADERS([byteswap.h]) |
|
||||
|
|
||||
AX_PTHREAD([ac_have_pthread=yes], [ac_have_pthread=no]) |
|
||||
AM_CONDITIONAL([USE_PTHREAD], [test "x$ac_have_pthread" == "xyes"]) |
|
||||
if test "x$ac_have_pthread" == "xyes"; then |
|
||||
AC_DEFINE([HAVE_PTHREAD], 1, [Define if we have pthread support]) |
|
||||
fi |
|
||||
|
|
||||
# |
|
||||
# libsecp256k1 |
|
||||
# |
|
||||
# FIXME: This is needed to force libtool to use all object files from secp. |
|
||||
# We can only build secp properly by recursively invoking |
|
||||
# configure/make, and can't include it as a noinst_ library. Libtool |
|
||||
# assumes that such libraries will be installed along with our library |
|
||||
# target and so won't force all object files in the library to be |
|
||||
# included in ours - despite the fact that we are making a shared |
|
||||
# library and linking to a static one. This is broken and we work |
|
||||
# around it by hacking the whole-archive flags into the _LDADD variable |
|
||||
# for wallycore. |
|
||||
# Because automake tries to police its users very strictly and fails |
|
||||
# hard when flags are passed in this way, we have to substitute the |
|
||||
# flags here. |
|
||||
# Because libtool both intercepts -Wl and arbitrarily re-orders its |
|
||||
# command line inputs, we have to concoct a single expression to |
|
||||
# enforce linking that cannot be split, hence the below expression. |
|
||||
LIBADD_SECP256K1="secp256k1/.libs/libsecp256k1.a" |
|
||||
if test "x$whole_archive" == "xyes"; then |
|
||||
LIBADD_SECP256K1="-Wl,--whole-archive,secp256k1/.libs/libsecp256k1.a,--no-whole-archive" |
|
||||
fi |
|
||||
AC_SUBST([LIBADD_SECP256K1]) |
|
||||
|
|
||||
# |
|
||||
# Python facilities |
|
||||
# |
|
||||
AX_PYTHON_DEVEL([>= '2.7.0']) |
|
||||
AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != ""]) |
|
||||
AM_CONDITIONAL([RUN_PYTHON_TESTS], [test "x$pythonexists" == "xyes"]) |
|
||||
|
|
||||
# |
|
||||
# SWIG |
|
||||
# |
|
||||
AC_PROG_SWIG |
|
||||
|
|
||||
AC_ARG_ENABLE(swig-python, |
|
||||
AS_HELP_STRING([--enable-swig-python],[enable the SWIG python interface (default: no)]), |
|
||||
[swig_python=$enableval], [swig_python=no]) |
|
||||
AM_CONDITIONAL([USE_SWIG_PYTHON], [test "x$swig_python" == "xyes"]) |
|
||||
|
|
||||
if test "x$swig_python" == "xyes"; then |
|
||||
if test "x$pythonexists" != "xyes"; then |
|
||||
AC_MSG_FAILURE([ERROR: No usable python was found for swig-python]) |
|
||||
fi |
|
||||
SWIG_PYTHON |
|
||||
AX_CHECK_COMPILE_FLAG([-DSWIG_PYTHON_BUILD=1], [AM_CFLAGS="$AM_CFLAGS -DSWIG_PYTHON_BUILD=1"]) |
|
||||
fi |
|
||||
|
|
||||
AC_ARG_ENABLE(swig-java, |
|
||||
AS_HELP_STRING([--enable-swig-java],[enable the SWIG java (JNI) interface (default: no)]), |
|
||||
[swig_java=$enableval], [swig_java=no]) |
|
||||
AM_CONDITIONAL([USE_SWIG_JAVA], [test "x$swig_java" == "xyes"]) |
|
||||
|
|
||||
if test "x$swig_java" == "xyes"; then |
|
||||
AX_JNI_INCLUDE_DIR |
|
||||
for JNI_DIR in $JNI_INCLUDE_DIRS; do |
|
||||
SWIG_JAVA_CPPFLAGS="$SWIG_JAVA_CPPFLAGS -I$JNI_DIR" |
|
||||
done |
|
||||
SWIG_JAVA_OPT="-java" |
|
||||
AC_SUBST([SWIG_JAVA_CPPFLAGS]) |
|
||||
AC_SUBST([SWIG_JAVA_OPT]) |
|
||||
AX_CHECK_COMPILE_FLAG([-DSWIG_JAVA_BUILD=1], [AM_CFLAGS="$AM_CFLAGS -DSWIG_JAVA_BUILD=1"]) |
|
||||
fi |
|
||||
|
|
||||
if test "x$JAVA_HOME" != "x"; then |
|
||||
JAVA="$JAVA_HOME/bin/java" |
|
||||
AC_SUBST([JAVA]) |
|
||||
JAVAC="$JAVA_HOME/bin/javac" |
|
||||
AC_SUBST([JAVAC]) |
|
||||
JAR="$JAVA_HOME/bin/jar" |
|
||||
AC_SUBST([JAR]) |
|
||||
else |
|
||||
AC_CHECK_PROGS(JAVA, [java]) |
|
||||
AC_CHECK_PROGS(JAVAC, [javac]) |
|
||||
AC_CHECK_PROGS(JAR, [jar]) |
|
||||
fi |
|
||||
AM_CONDITIONAL([HAVE_JAVA], [test "x$JAVA" != "x"]) |
|
||||
AM_CONDITIONAL([HAVE_JAVAC], [test "x$JAVAC" != "x"]) |
|
||||
if test "x$swig_java" == "xyes"; then |
|
||||
if test "x$JAVAC" != "x"; then |
|
||||
if test "x$JAVA" != "x"; then |
|
||||
# Only run tests if we have java-swig, compiler and interpreter |
|
||||
run_java_tests="yes" |
|
||||
fi |
|
||||
fi |
|
||||
fi |
|
||||
AM_CONDITIONAL([RUN_JAVA_TESTS], [test "x$run_java_tests" != "x"]) |
|
||||
JAVAC_TARGET=1.7 |
|
||||
AC_SUBST([JAVAC_TARGET]) |
|
||||
|
|
||||
AC_SUBST([AM_CFLAGS]) |
|
||||
|
|
||||
AC_CONFIG_FILES([ |
|
||||
Makefile |
|
||||
src/Makefile |
|
||||
]) |
|
||||
|
|
||||
secp_jni="--disable-jni" |
|
||||
if test "x$swig_java" == "xyes"; then |
|
||||
secp_jni="--enable-jni" |
|
||||
fi |
|
||||
ac_configure_args="${ac_configure_args} --disable-shared ${secp_jni} --with-pic --with-bignum=no --enable-experimental --enable-module-schnorr --enable-module-ecdh --enable-openssl-tests=no --disable-dependency-tracking" |
|
||||
AC_CONFIG_SUBDIRS([src/secp256k1]) |
|
||||
|
|
||||
|
|
||||
AC_OUTPUT |
|
@ -1,226 +0,0 @@ |
|||||
#ifndef LIBWALLY_CORE_BIP32_H |
|
||||
#define LIBWALLY_CORE_BIP32_H |
|
||||
|
|
||||
#include "wally_core.h" |
|
||||
|
|
||||
#include <stdint.h> |
|
||||
|
|
||||
/** The required lengths of entropy for @bip32_key_from_seed */ |
|
||||
#define BIP32_ENTROPY_LEN_128 16 |
|
||||
#define BIP32_ENTROPY_LEN_256 32 |
|
||||
#define BIP32_ENTROPY_LEN_512 64 |
|
||||
|
|
||||
/** Length of an ext_key serialized using BIP32 format */ |
|
||||
#define BIP32_SERIALIZED_LEN 78 |
|
||||
|
|
||||
/** Child number of the first hardened child */ |
|
||||
#define BIP32_INITIAL_HARDENED_CHILD 0x80000000 |
|
||||
|
|
||||
/** Indicate that we want to derive a private key in @bip32_key_from_parent */ |
|
||||
#define BIP32_FLAG_KEY_PRIVATE 0x0 |
|
||||
/** Indicate that we want to derive a public key in @bip32_key_from_parent */ |
|
||||
#define BIP32_FLAG_KEY_PUBLIC 0x1 |
|
||||
/** Indicate that we want to skip hash calculation when deriving a key in @bip32_key_from_parent */ |
|
||||
#define BIP32_FLAG_SKIP_HASH 0x2 |
|
||||
|
|
||||
/** Version codes for extended keys */ |
|
||||
#define BIP32_VER_MAIN_PUBLIC 0x0488B21E |
|
||||
#define BIP32_VER_MAIN_PRIVATE 0x0488ADE4 |
|
||||
#define BIP32_VER_TEST_PUBLIC 0x043587CF |
|
||||
#define BIP32_VER_TEST_PRIVATE 0x04358394 |
|
||||
|
|
||||
#ifdef SWIG |
|
||||
struct ext_key; |
|
||||
#else |
|
||||
/** An extended key */ |
|
||||
struct ext_key { |
|
||||
/** The chain code for this key */ |
|
||||
unsigned char chain_code[32]; |
|
||||
/** The Hash160 of this keys parent */ |
|
||||
unsigned char parent160[20]; |
|
||||
/** The depth of this key */ |
|
||||
uint8_t depth; |
|
||||
unsigned char pad1[10]; |
|
||||
/** The private key with prefix byte 0 */ |
|
||||
unsigned char priv_key[33]; |
|
||||
/** The child number of the parent key that this key represents */ |
|
||||
uint32_t child_num; |
|
||||
/** The Hash160 of this key */ |
|
||||
unsigned char hash160[20]; |
|
||||
/** The child number of the parent key that this key represents */ |
|
||||
uint32_t version; |
|
||||
unsigned char pad2[3]; |
|
||||
/** The public key with prefix byte 0x2 or 0x3 */ |
|
||||
unsigned char pub_key[33]; |
|
||||
}; |
|
||||
#endif /* SWIG */ |
|
||||
|
|
||||
#ifndef SWIG_PYTHON |
|
||||
/**
|
|
||||
* Free a key allocated by @bip32_key_from_seed_alloc |
|
||||
* or @bip32_key_unserialize_alloc. |
|
||||
* |
|
||||
* @key_in Key to free. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip32_key_free( |
|
||||
const struct ext_key *key_in); |
|
||||
#endif /* SWIG_PYTHON */ |
|
||||
|
|
||||
/**
|
|
||||
*/ |
|
||||
WALLY_CORE_API int bip32_key_init_alloc( |
|
||||
uint32_t version, |
|
||||
uint32_t depth, |
|
||||
uint32_t child_num, |
|
||||
const unsigned char *chain_code, |
|
||||
size_t chain_code_len, |
|
||||
const unsigned char *pub_key, |
|
||||
size_t pub_key_len, |
|
||||
const unsigned char *priv_key, |
|
||||
size_t priv_key_len, |
|
||||
const unsigned char *hash160, |
|
||||
size_t hash160_len, |
|
||||
const unsigned char *parent160, |
|
||||
size_t parent160_len, |
|
||||
const struct ext_key **output); |
|
||||
|
|
||||
#ifndef SWIG |
|
||||
/**
|
|
||||
* Create a new master extended key from entropy. |
|
||||
* |
|
||||
* This creates a new master key, i.e. the root of a new HD tree. |
|
||||
* @bytes_in Entropy to use. |
|
||||
* @len_in Size of @bytes_in in bytes. Must be one of @BIP32_ENTROPY_LEN_128, |
|
||||
* @BIP32_ENTROPY_LEN_256 or @BIP32_ENTROPY_LEN_512. |
|
||||
* @version Either @BIP32_VER_MAIN_PRIVATE or @BIP32_VER_TEST_PRIVATE, |
|
||||
* indicating mainnet or testnet/regtest respectively. |
|
||||
* @flags Either BIP32_FLAG_SKIP_HASH to skip hash160 calculation, or 0. |
|
||||
* @output Destination for the resulting master extended key. |
|
||||
* |
|
||||
* The entropy passed in may produce an invalid key. If this happens, |
|
||||
* WALLY_ERROR will be returned and the caller should retry with |
|
||||
* new entropy. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip32_key_from_seed( |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
uint32_t version, |
|
||||
uint32_t flags, |
|
||||
struct ext_key *output); |
|
||||
#endif |
|
||||
|
|
||||
/**
|
|
||||
* As per @bip32_key_from_seed, but allocates the key. |
|
||||
* |
|
||||
* @note The returned key should be freed with @bip32_key_free. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip32_key_from_seed_alloc( |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
uint32_t version, |
|
||||
uint32_t flags, |
|
||||
const struct ext_key **output); |
|
||||
|
|
||||
/**
|
|
||||
* Serialize an extended key to memory using BIP32 format. |
|
||||
* |
|
||||
* @key_in The extended key to serialize. |
|
||||
* @flags BIP32_FLAG_KEY_ Flags indicating which key to serialize. You can not |
|
||||
* serialize a private extended key from a public extended key. |
|
||||
* @bytes_out Destination for the serialized key. |
|
||||
* @len Size of @bytes_out in bytes. Must be @BIP32_SERIALIZED_LEN. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip32_key_serialize( |
|
||||
const struct ext_key *key_in, |
|
||||
uint32_t flags, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len); |
|
||||
|
|
||||
|
|
||||
#ifndef SWIG |
|
||||
/**
|
|
||||
* Un-serialize an extended key from memory. |
|
||||
* |
|
||||
* @bytes_in Storage holding the serialized key. |
|
||||
* @len_in Size of @bytes_in in bytes. Must be @BIP32_SERIALIZED_LEN. |
|
||||
* @output Destination for the resulting extended key. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip32_key_unserialize( |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
struct ext_key *output); |
|
||||
#endif |
|
||||
|
|
||||
/**
|
|
||||
* As per @bip32_key_unserialize, but allocates the key. |
|
||||
* |
|
||||
* @note The returned key should be freed with @bip32_key_free. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip32_key_unserialize_alloc( |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
const struct ext_key **output); |
|
||||
|
|
||||
#ifndef SWIG |
|
||||
/**
|
|
||||
* Create a new child extended key from a parent extended key. |
|
||||
* |
|
||||
* @key_in The parent extended key. |
|
||||
* @child_num The child number to create. Numbers greater |
|
||||
* than or equal to @BIP32_INITIAL_HARDENED_CHILD represent |
|
||||
* hardened keys that cannot be created from public parent |
|
||||
* extended keys. |
|
||||
* @flags BIP32_FLAG_KEY_ Flags indicating the type of derivation wanted. |
|
||||
* You can not derive a private child extended key from a public |
|
||||
* parent extended key. |
|
||||
* @output Destination for the resulting child extended key. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip32_key_from_parent( |
|
||||
const struct ext_key *key_in, |
|
||||
uint32_t child_num, |
|
||||
uint32_t flags, |
|
||||
struct ext_key *output); |
|
||||
#endif |
|
||||
|
|
||||
/**
|
|
||||
* As per @bip32_key_from_parent, but allocates the key. |
|
||||
* |
|
||||
* @note The returned key should be freed with @bip32_key_free. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip32_key_from_parent_alloc( |
|
||||
const struct ext_key *key_in, |
|
||||
uint32_t child_num, |
|
||||
uint32_t flags, |
|
||||
const struct ext_key **output); |
|
||||
|
|
||||
#endif /* LIBWALLY_CORE_BIP32_H */ |
|
||||
|
|
||||
#ifndef SWIG |
|
||||
/**
|
|
||||
* Create a new child extended key from a parent extended key and a path. |
|
||||
* |
|
||||
* @key_in The parent extended key. |
|
||||
* @child_path_in The path of child numbers to create. |
|
||||
* @child_path_len The number of child numbers in @child_path_in. |
|
||||
* @flags BIP32_KEY_ Flags indicating the type of derivation wanted. |
|
||||
* @output Destination for the resulting child extended key. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip32_key_from_parent_path( |
|
||||
const struct ext_key *key_in, |
|
||||
const uint32_t *child_num_in, |
|
||||
size_t child_num_len, |
|
||||
uint32_t flags, |
|
||||
struct ext_key *output); |
|
||||
#endif |
|
||||
|
|
||||
/**
|
|
||||
* As per @bip32_key_from_parent_path, but allocates the key. |
|
||||
* |
|
||||
* @note The returned key should be freed with @bip32_key_free. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip32_key_from_parent_path_alloc( |
|
||||
const struct ext_key *key_in, |
|
||||
const uint32_t *child_num_in, |
|
||||
size_t child_num_len, |
|
||||
uint32_t flags, |
|
||||
const struct ext_key **output); |
|
@ -1,96 +0,0 @@ |
|||||
#ifndef LIBWALLY_CORE_BIP38_H |
|
||||
#define LIBWALLY_CORE_BIP38_H |
|
||||
|
|
||||
#include "wally_core.h" |
|
||||
|
|
||||
#include <stdint.h> |
|
||||
|
|
||||
/** Flags for BIP38 conversion. The first 8 bits are reserved for the network */ |
|
||||
#define BIP38_KEY_MAINNET 0 /** Address is for main network */ |
|
||||
#define BIP38_KEY_TESTNET 7 /** Address is for test network */ |
|
||||
#define BIP38_KEY_COMPRESSED 256 /** Public key is compressed */ |
|
||||
#define BIP38_KEY_EC_MULT 512 /** EC-Multiplied key (FIXME: Not implemented) */ |
|
||||
#define BIP38_KEY_QUICK_CHECK 1024 /** Check structure only (no password required) */ |
|
||||
#define BIP38_KEY_RAW_MODE 2048 /** Treat bytes in as raw data */ |
|
||||
#define BIP38_KEY_SWAP_ORDER 4096 /** Hash comes after encrypted key */ |
|
||||
|
|
||||
#define BIP38_SERIALIZED_LEN 39 /** Length of a raw BIP38 key in bytes */ |
|
||||
|
|
||||
|
|
||||
/**
|
|
||||
* Encode a private key in raw BIP 38 address format. |
|
||||
* |
|
||||
* @bytes_in Private key to use. |
|
||||
* @len_in Size of @bytes_in in bytes. Must be 32. |
|
||||
* @pass Password for the encoded private key. |
|
||||
* @pass_len Length of @pass in bytes. |
|
||||
* @flags BIP38_KEY_ flags indicating desired behaviour. |
|
||||
* @bytes_out Destination for the resulting raw BIP38 address. |
|
||||
* @len Size of @bytes_out in bytes. Must be @BIP38_SERIALIZED_LEN. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip38_raw_from_private_key( |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
const unsigned char *pass, |
|
||||
size_t pass_len, |
|
||||
uint32_t flags, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len); |
|
||||
|
|
||||
/**
|
|
||||
* Encode a private key in BIP 38 address format. |
|
||||
* |
|
||||
* @bytes_in Private key to use. |
|
||||
* @len_in Size of @bytes_in in bytes. Must be 32. |
|
||||
* @pass Password for the encoded private key. |
|
||||
* @pass_len Length of @pass in bytes. |
|
||||
* @flags BIP38_KEY_ flags indicating desired behaviour. |
|
||||
* @output Destination for the resulting BIP38 address. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip38_from_private_key( |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
const unsigned char *pass, |
|
||||
size_t pass_len, |
|
||||
uint32_t flags, |
|
||||
char **output); |
|
||||
|
|
||||
/**
|
|
||||
* Decode a raw BIP 38 address to a private key. |
|
||||
* |
|
||||
* @bytes_in Raw BIP 38 address to decode. |
|
||||
* @len_in Size of @bytes_in in bytes. Must be @BIP38_SERIALIZED_LEN. |
|
||||
* @pass Password for the encoded private key. |
|
||||
* @pass_len Length of @pass in bytes. |
|
||||
* @flags BIP38_KEY_ flags indicating desired behaviour. |
|
||||
* @bytes_out Destination for the resulting private key. |
|
||||
* @len Size of @bytes_out in bytes. Must be 32. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip38_raw_to_private_key( |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
const unsigned char *pass, |
|
||||
size_t pass_len, |
|
||||
uint32_t flags, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len); |
|
||||
|
|
||||
/**
|
|
||||
* Decode a BIP 38 address to a private key. |
|
||||
* |
|
||||
* @bip38 BIP 38 address to decode. |
|
||||
* @pass Password for the encoded private key. |
|
||||
* @pass_len Length of @pass in bytes. |
|
||||
* @flags BIP38_KEY_ flags indicating desired behaviour. |
|
||||
* @bytes_out Destination for the resulting private key. |
|
||||
* @len Size of @bytes_out in bytes. Must be 32. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip38_to_private_key( |
|
||||
const char *bip38, |
|
||||
const unsigned char *pass, |
|
||||
size_t pass_len, |
|
||||
uint32_t flags, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len); |
|
||||
|
|
||||
#endif /* LIBWALLY_CORE_BIP38_H */ |
|
@ -1,113 +0,0 @@ |
|||||
#ifndef LIBWALLY_CORE_BIP39_H |
|
||||
#define LIBWALLY_CORE_BIP39_H |
|
||||
|
|
||||
#include "wally_core.h" |
|
||||
|
|
||||
#include <stdint.h> |
|
||||
|
|
||||
struct words; |
|
||||
|
|
||||
/** Valid entropy lengths */ |
|
||||
#define BIP39_ENTROPY_LEN_128 16 |
|
||||
#define BIP39_ENTROPY_LEN_160 20 |
|
||||
#define BIP39_ENTROPY_LEN_192 24 |
|
||||
#define BIP39_ENTROPY_LEN_224 28 |
|
||||
#define BIP39_ENTROPY_LEN_256 32 |
|
||||
#define BIP39_ENTROPY_LEN_288 36 |
|
||||
#define BIP39_ENTROPY_LEN_320 40 |
|
||||
|
|
||||
/** The required size of the output buffer for @bip39_mnemonic_to_seed */ |
|
||||
#define BIP39_SEED_LEN_512 64 |
|
||||
|
|
||||
/** The number of words in a BIP39 compliant wordlist */ |
|
||||
#define BIP39_WORDLIST_LEN 2048 |
|
||||
|
|
||||
/**
|
|
||||
* Get the list of default supported languages. |
|
||||
* |
|
||||
* The string returned should be freed using @wally_free_string. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip39_get_languages( |
|
||||
char **output); |
|
||||
|
|
||||
/**
|
|
||||
* Get the default word list for language @lang. |
|
||||
* |
|
||||
* If @lang is NULL or not found the default English list is returned. |
|
||||
* |
|
||||
* The returned structure should not be freed. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip39_get_wordlist( |
|
||||
const char *lang, |
|
||||
const struct words **output); |
|
||||
|
|
||||
/**
|
|
||||
* Get the 'index'th word from a word list. |
|
||||
* |
|
||||
* @w Word list to use. Pass NULL to use the default English list. |
|
||||
* @index The 0-based index of the word in @w. |
|
||||
* @output Destination for the resulting word. |
|
||||
* |
|
||||
* The string returned should be freed using @wally_free_string. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip39_get_word( |
|
||||
const struct words *w, |
|
||||
size_t index, |
|
||||
char **output); |
|
||||
|
|
||||
/**
|
|
||||
* Generate a mnemonic sentence from the entropy in @bytes_in. |
|
||||
* @w Word list to use. Pass NULL to use the default English list. |
|
||||
* @bytes_in: Entropy to convert. |
|
||||
* @len_in: The length of @bytes_in in bytes. |
|
||||
* @output Destination for the resulting mnemonic sentence. |
|
||||
* |
|
||||
* The string returned should be freed using @wally_free_string. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip39_mnemonic_from_bytes( |
|
||||
const struct words *w, |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
char **output); |
|
||||
|
|
||||
/**
|
|
||||
* Convert a mnemonic sentence into entropy at @bytes_out. |
|
||||
* @w Word list to use. Pass NULL to use the default English list. |
|
||||
* @mnemonic Mnemonic to convert. |
|
||||
* @bytes_out: Where to store the resulting entropy. |
|
||||
* @len: The length of @bytes_out in bytes. |
|
||||
* @written: Destination for the number of bytes written to @bytes_out. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip39_mnemonic_to_bytes( |
|
||||
const struct words *w, |
|
||||
const char *mnemonic, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len, |
|
||||
size_t *written); |
|
||||
|
|
||||
/**
|
|
||||
* Validate the checksum embedded in the mnemonic sentence @mnemonic. |
|
||||
* @w Word list to use. Pass NULL to use the default English list. |
|
||||
* @mnemonic Mnemonic to validate. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip39_mnemonic_validate( |
|
||||
const struct words *w, |
|
||||
const char *mnemonic); |
|
||||
|
|
||||
/**
|
|
||||
* Convert a mnemonic into a binary seed. |
|
||||
* @mnemonic Mnemonic to convert. |
|
||||
* @password Mnemonic password or NULL if no password is needed. |
|
||||
* @bytes_out The destination for the binary seed. |
|
||||
* @len The length of @bytes_out in bytes. Currently This must |
|
||||
* be @BIP39_SEED_LEN_512. |
|
||||
* @written: Destination for the number of bytes written to @bytes_out. |
|
||||
*/ |
|
||||
WALLY_CORE_API int bip39_mnemonic_to_seed( |
|
||||
const char *mnemonic, |
|
||||
const char *password, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len, |
|
||||
size_t *written); |
|
||||
|
|
||||
#endif /* LIBWALLY_CORE_BIP39_H */ |
|
@ -1,206 +0,0 @@ |
|||||
#ifndef WALLY_CORE_H |
|
||||
#define WALLY_CORE_H |
|
||||
|
|
||||
#include <stdlib.h> |
|
||||
#include <stdint.h> |
|
||||
|
|
||||
#ifndef WALLY_CORE_API |
|
||||
# if defined(_WIN32) |
|
||||
# ifdef WALLY_CORE_BUILD |
|
||||
# define WALLY_CORE_API __declspec(dllexport) |
|
||||
# else |
|
||||
# define WALLY_CORE_API |
|
||||
# endif |
|
||||
# elif defined(__GNUC__) && defined(WALLY_CORE_BUILD) |
|
||||
# define WALLY_CORE_API __attribute__ ((visibility ("default"))) |
|
||||
# else |
|
||||
# define WALLY_CORE_API |
|
||||
# endif |
|
||||
#endif |
|
||||
|
|
||||
/** Return codes */ |
|
||||
#define WALLY_OK 0 /** Success */ |
|
||||
#define WALLY_ERROR -1 /** General error */ |
|
||||
#define WALLY_EINVAL -2 /** Invalid argument */ |
|
||||
#define WALLY_ENOMEM -3 /** malloc() failed */ |
|
||||
|
|
||||
/**
|
|
||||
* Securely wipe memory. |
|
||||
* |
|
||||
* @bytes_in Memory to wipe |
|
||||
* @len_in Size of @bytes_in in bytes. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_bzero( |
|
||||
void *bytes, |
|
||||
size_t len_in); |
|
||||
|
|
||||
/**
|
|
||||
* Securely wipe and then free a string allocted by the library. |
|
||||
* |
|
||||
* @str String to free (must be NUL terminated UTF-8). |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_free_string( |
|
||||
char *str); |
|
||||
|
|
||||
/** Length of entropy required for @wally_randomize_context */ |
|
||||
#define WALLY_SECP_RANDOMISE_LEN 32 |
|
||||
|
|
||||
/**
|
|
||||
* Provide entropy to randomize the libraries internal secp256k1 context. |
|
||||
* |
|
||||
* @bytes_in Entropy to use. |
|
||||
* @len_in Size of @bytes_in in bytes. Must be @WALLY_SECP_RANDOMISE_LEN. |
|
||||
* |
|
||||
* Random data is used in libsecp256k1 to blind the data being processed, to |
|
||||
* make side channel attacks more difficult. libwallycore uses a single |
|
||||
* internal context for secp functions that is not randomized at run time. |
|
||||
* The caller should call this function before using any functions that rely on |
|
||||
* secp (anything using public/private keys). |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_secp_randomize( |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in); |
|
||||
|
|
||||
/**
|
|
||||
* Convert bytes to a (lower-case) hexadecimal string. |
|
||||
* |
|
||||
* @bytes_in Bytes to convert. |
|
||||
* @len_in Size of @bytes_in in bytes. |
|
||||
* @output Destination for the resulting hexadecimal string. |
|
||||
* |
|
||||
* The string returned should be freed using @wally_free_string. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_hex_from_bytes( |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
char **output); |
|
||||
|
|
||||
/**
|
|
||||
* Convert a hexadecimal string to bytes. |
|
||||
* |
|
||||
* @hex String to convert. |
|
||||
* @bytes_out: Where to store the resulting bytes. |
|
||||
* @len: The length of @bytes_out in bytes. |
|
||||
* @written: Destination for the number of bytes written to @bytes_out. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_hex_to_bytes( |
|
||||
const char *hex, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len, |
|
||||
size_t *written); |
|
||||
|
|
||||
/** For @wally_base58_from_bytes, indicates that a checksum should
|
|
||||
* be generated. For @wally_base58_to_bytes, indicates that the |
|
||||
* embedded checksum should be validated and stripped off the returned |
|
||||
* bytes. |
|
||||
**/ |
|
||||
#define BASE58_FLAG_CHECKSUM 0x1 |
|
||||
|
|
||||
/** The number of extra bytes required to hold a base58 checksum */ |
|
||||
#define BASE58_CHECKSUM_LEN 4 |
|
||||
|
|
||||
/**
|
|
||||
* Create a base 58 encoded string representing binary data. |
|
||||
* |
|
||||
* @bytes_in: Binary data to convert. |
|
||||
* @len_in: The length of @bytes_in in bytes. |
|
||||
* @flags: Pass @BASE58_FLAG_CHECKSUM if @bytes_in should have a |
|
||||
* checksum calculated and appended before converting to base 58. |
|
||||
* @output Destination for the base 58 encoded string representing @bytes_in. |
|
||||
* The string returned should be freed using @wally_free_string. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_base58_from_bytes( |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
uint32_t flags, |
|
||||
char **output); |
|
||||
|
|
||||
/**
|
|
||||
* Decode a base 58 encoded string back into into binary data. |
|
||||
* |
|
||||
* @str_in: Base 58 encoded string to decode. |
|
||||
* @flags: Pass @BASE58_FLAG_CHECKSUM if @bytes_out should have a |
|
||||
* checksum validated and removed before returning. In this case, @len |
|
||||
* must contain an extra @BASE58_CHECKSUM_LEN bytes to calculate the |
|
||||
* checksum into. The returned length will not include the checksum. |
|
||||
* @bytes_out: Destination for converted binary data. |
|
||||
* @len: The length of @bytes_out in bytes. |
|
||||
* @written: Destination for the length of the decoded bytes. |
|
||||
* |
|
||||
* If the function succeeds, you must check @written. If it is greater |
|
||||
* than @len then no data has been written and the function should be retried |
|
||||
* with a buffer of at least @written bytes in size. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_base58_to_bytes( |
|
||||
const char *str_in, |
|
||||
uint32_t flags, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len, |
|
||||
size_t *written); |
|
||||
|
|
||||
/**
|
|
||||
* Return the length of a base58 encoded string once decoded into bytes. |
|
||||
* |
|
||||
* @str_in: Base 58 encoded string to find the length of. |
|
||||
* @written: Destination for the length of the decoded bytes. |
|
||||
* |
|
||||
* Returns the exact number of bytes that would be required to store @str_in |
|
||||
* as decoded binary, including any embedded checksum. If the string contains |
|
||||
* invalid characters then WALLY_EINVAL is returned. Note that no checksum |
|
||||
* validation takes place. |
|
||||
* |
|
||||
* In the worst case (an all zero buffer, represented by a string of '1' |
|
||||
* characters), this function will return strlen(@str_in). You can therefore |
|
||||
* safely use the length of @str_in as a buffer size to avoid calling this |
|
||||
* function in most cases. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_base58_get_length( |
|
||||
const char *str_in, |
|
||||
size_t *written); |
|
||||
|
|
||||
|
|
||||
#ifndef SWIG |
|
||||
/** The type of an overridable function to allocate memory */ |
|
||||
typedef void *(*wally_malloc_t)( |
|
||||
size_t size); |
|
||||
|
|
||||
/** The type of an overridable function to free memory */ |
|
||||
typedef void (*wally_free_t)( |
|
||||
void *ptr); |
|
||||
|
|
||||
/** The type of an overridable function to generate an EC nonce */ |
|
||||
typedef int (*wally_ec_nonce_t)( |
|
||||
unsigned char *nonce32, |
|
||||
const unsigned char *msg32, |
|
||||
const unsigned char *key32, |
|
||||
const unsigned char *algo16, |
|
||||
void *data, |
|
||||
unsigned int attempt |
|
||||
); |
|
||||
|
|
||||
/** Structure holding function pointers for overridable wally operations */ |
|
||||
struct wally_operations { |
|
||||
wally_malloc_t malloc_fn; |
|
||||
wally_free_t free_fn; |
|
||||
wally_ec_nonce_t ec_nonce_fn; |
|
||||
}; |
|
||||
|
|
||||
/**
|
|
||||
* Fetch the current overridable operations used by wally. |
|
||||
* |
|
||||
* @output: Destination for the overridable operations. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_get_operations( |
|
||||
struct wally_operations *output); |
|
||||
|
|
||||
/**
|
|
||||
* Set the current overridable operations used by wally. |
|
||||
* |
|
||||
* @ops: The overridable operations to set. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_set_operations( |
|
||||
const struct wally_operations *ops); |
|
||||
|
|
||||
#endif /* SWIG */ |
|
||||
|
|
||||
#endif /* WALLY_CORE_H */ |
|
@ -1,442 +0,0 @@ |
|||||
#ifndef LIBWALLY_CORE_CRYPTO_H |
|
||||
#define LIBWALLY_CORE_CRYPTO_H |
|
||||
|
|
||||
#include "wally_core.h" |
|
||||
|
|
||||
#include <stdint.h> |
|
||||
#include <stdlib.h> |
|
||||
|
|
||||
/**
|
|
||||
* Derive a pseudorandom key from inputs using an expensive application |
|
||||
* of HMAC SHA-256. |
|
||||
* |
|
||||
* @pass: Password to derive from. |
|
||||
* @pass_len: Length of @pass in bytes. |
|
||||
* @salt: Salt to derive from. |
|
||||
* @salt_len: Length of @salt in bytes. |
|
||||
* @cost: The cost of the function. The larger this number, the |
|
||||
* longer the key will take to derive. |
|
||||
* @block_size: The size of memory blocks required. |
|
||||
* @parallelism: Parallelism factor. |
|
||||
* @bytes_out: Destination for the derived pseudorandom key. |
|
||||
* @len: The length of @bytes_out in bytes. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_scrypt( |
|
||||
const unsigned char *pass, |
|
||||
size_t pass_len, |
|
||||
const unsigned char *salt, |
|
||||
size_t salt_len, |
|
||||
uint32_t cost, |
|
||||
uint32_t block_size, |
|
||||
uint32_t parallelism, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len); |
|
||||
|
|
||||
|
|
||||
#define AES_BLOCK_LEN 16 /** Length of AES encrypted blocks */ |
|
||||
|
|
||||
#define AES_KEY_LEN_128 16 /** AES-128 Key length */ |
|
||||
#define AES_KEY_LEN_192 24 /** AES-192 Key length */ |
|
||||
#define AES_KEY_LEN_256 32 /** AES-256 Key length */ |
|
||||
|
|
||||
#define AES_FLAG_ENCRYPT 1 /** Encrypt */ |
|
||||
#define AES_FLAG_DECRYPT 2 /** Decrypt */ |
|
||||
|
|
||||
/**
|
|
||||
* Encrypt/decrypt data using AES (ECB mode, no padding). |
|
||||
* |
|
||||
* @key: Key material for initialisation. |
|
||||
* @key_len: Length of @key in bytes. Must be an AES_KEY_LEN_ constant. |
|
||||
* @bytes_in: Bytes to encrypt/decrypt. |
|
||||
* @len_in: Length of @bytes_in in bytes. Must be a multiple of @AES_BLOCK_LEN. |
|
||||
* @flags: AES_FLAG_ constants indicating the desired behaviour. |
|
||||
* @bytes_out: Destination for the encrypted/decrypted data. |
|
||||
* @len: The length of @bytes_out in bytes. Must be a multiple of @AES_BLOCK_LEN. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_aes( |
|
||||
const unsigned char *key, |
|
||||
size_t key_len, |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
uint32_t flags, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len); |
|
||||
|
|
||||
/**
|
|
||||
* Encrypt/decrypt data using AES (CBC mode). |
|
||||
* |
|
||||
* @key: Key material for initialisation. |
|
||||
* @key_len: Length of @key in bytes. Must be an AES_KEY_LEN_ constant. |
|
||||
* @iv: Initialisation vector. |
|
||||
* @iv_len: Length of @iv in bytes. Must be @AES_BLOCK_LEN. |
|
||||
* @bytes_in: Bytes to encrypt/decrypt. |
|
||||
* @len_in: Length of @bytes_in in bytes. Must be a multiple of @AES_BLOCK_LEN. |
|
||||
* @flags: AES_FLAG_ constants indicating the desired behaviour. |
|
||||
* @bytes_out: Destination for the encrypted/decrypted data. |
|
||||
* @len: The length of @bytes_out in bytes. Must be a multiple of @AES_BLOCK_LEN. |
|
||||
* @written: Destination for the number of bytes written to @bytes_out. |
|
||||
* |
|
||||
* Defaults to PKCS#7 padding. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_aes_cbc( |
|
||||
const unsigned char *key, |
|
||||
size_t key_len, |
|
||||
const unsigned char *iv, |
|
||||
size_t iv_len, |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
uint32_t flags, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len, |
|
||||
size_t *written); |
|
||||
|
|
||||
|
|
||||
/** Output length for @wally_sha256 */ |
|
||||
#define SHA256_LEN 32 |
|
||||
|
|
||||
/** Output length for @wally_sha512 */ |
|
||||
#define SHA512_LEN 64 |
|
||||
|
|
||||
/**
|
|
||||
* SHA-256(m) |
|
||||
* |
|
||||
* @bytes_in: The message to hash |
|
||||
* @len_in: The length of @bytes_in in bytes. |
|
||||
* @bytes_out: Destination for the resulting hash. |
|
||||
* @len: The length of @bytes_out in bytes. Must be @SHA256_LEN. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_sha256( |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len); |
|
||||
|
|
||||
/**
|
|
||||
* SHA-256(SHA-256(m)) (double SHA-256) |
|
||||
* |
|
||||
* @bytes_in: The message to hash |
|
||||
* @len_in: The length of @bytes_in in bytes. |
|
||||
* @bytes_out: Destination for the resulting hash. |
|
||||
* @len: The length of @bytes_out in bytes. Must be @SHA256_LEN. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_sha256d( |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len); |
|
||||
|
|
||||
/**
|
|
||||
* SHA-512(m) |
|
||||
* |
|
||||
* @bytes_in: The message to hash |
|
||||
* @len_in: The length of @bytes_in in bytes. |
|
||||
* @bytes_out: Destination for the resulting hash. |
|
||||
* @len: The length of @bytes_out in bytes. Must be @SHA512_LEN. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_sha512( |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len); |
|
||||
|
|
||||
/** Output length for @wally_hash160 */ |
|
||||
#define HASH160_LEN 20 |
|
||||
|
|
||||
/**
|
|
||||
* RIPEMD-160(SHA-256(m)) |
|
||||
* |
|
||||
* @bytes_in: The message to hash |
|
||||
* @len_in: The length of @bytes_in in bytes. |
|
||||
* @bytes_out: Destination for the resulting hash. |
|
||||
* @len: The length of @bytes_out in bytes. Must be @HASH160_LEN. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_hash160( |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len); |
|
||||
|
|
||||
|
|
||||
/** Output length for @wally_hmac_sha256 */ |
|
||||
#define HMAC_SHA256_LEN 32 |
|
||||
|
|
||||
/** Output length for @wally_hmac_sha512 */ |
|
||||
#define HMAC_SHA512_LEN 64 |
|
||||
|
|
||||
/**
|
|
||||
* Compute an HMAC using SHA-256 |
|
||||
* |
|
||||
* @key: The key for the hash |
|
||||
* @key_len: The length of @key in bytes. |
|
||||
* @bytes_in: The message to hash |
|
||||
* @len_in: The length of @bytes_in in bytes. |
|
||||
* @bytes_out: Destination for the resulting HMAC. |
|
||||
* @len: The length of @bytes_out in bytes. Must be @HMAC_SHA256_LEN. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_hmac_sha256( |
|
||||
const unsigned char *key, |
|
||||
size_t key_len, |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len); |
|
||||
|
|
||||
/**
|
|
||||
* Compute an HMAC using SHA-512 |
|
||||
* |
|
||||
* @key: The key for the hash |
|
||||
* @key_len: The length of @key in bytes. |
|
||||
* @bytes_in: The message to hash |
|
||||
* @len_in: The length of @bytes_in in bytes. |
|
||||
* @bytes_out: Destination for the resulting HMAC. |
|
||||
* @len: The length of @bytes_out in bytes. Must be @HMAC_SHA512_LEN. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_hmac_sha512( |
|
||||
const unsigned char *key, |
|
||||
size_t key_len, |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len); |
|
||||
|
|
||||
|
|
||||
/** Extra bytes required at the end of 'salt_in_out' for pbkdf2 functions */ |
|
||||
#define PBKDF2_HMAC_EXTRA_LEN 4 |
|
||||
|
|
||||
/** Output length for @wally_pbkdf2_hmac_sha256 */ |
|
||||
#define PBKDF2_HMAC_SHA256_LEN 32 |
|
||||
|
|
||||
/** Output length for @wally_pbkdf2_hmac_sha512 */ |
|
||||
#define PBKDF2_HMAC_SHA512_LEN 64 |
|
||||
|
|
||||
/** For hmac functions, indicates that 'salt_in_out' contains
|
|
||||
* @PBKDF2_HMAC_EXTRA_LEN extra bytes for the block number to be added into. |
|
||||
*/ |
|
||||
#define PBKDF2_HMAC_FLAG_BLOCK_RESERVED 1 |
|
||||
|
|
||||
|
|
||||
/**
|
|
||||
* Derive a pseudorandom key from inputs using HMAC SHA-256. |
|
||||
* |
|
||||
* @pass: Password to derive from. |
|
||||
* @pass_len: Length of @pass in bytes. |
|
||||
* @salt_in_out: Salt to derive from. If @flags contains the value |
|
||||
* @PBKDF2_HMAC_FLAG_BLOCK_RESERVED then this memory must |
|
||||
* have @PBKDF2_HMAC_EXTRA_LEN of spare room at the end of the salt itself. |
|
||||
* @salt_len: Length of @salt_in_out in bytes, including any extra spare bytes. |
|
||||
* @flags: PBKDF2_HMAC_FLAG_ flag values indicating desired behaviour. |
|
||||
* @cost: The cost of the function. The larger this number, the |
|
||||
* longer the key will take to derive. |
|
||||
* @bytes_out: Destination for the derived pseudorandom key. |
|
||||
* @len: The length of @bytes_out in bytes. This must be a multiple |
|
||||
* of @PBKDF2_HMAC_SHA256_LEN. |
|
||||
* |
|
||||
* Returns 0 on success or non-zero if any parameter is invalid. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_pbkdf2_hmac_sha256( |
|
||||
const unsigned char *pass, |
|
||||
size_t pass_len, |
|
||||
unsigned char *salt_in_out, |
|
||||
size_t salt_len, |
|
||||
uint32_t flags, |
|
||||
uint32_t cost, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len); |
|
||||
|
|
||||
/**
|
|
||||
* Derive a pseudorandom key from inputs using HMAC SHA-512. |
|
||||
* |
|
||||
* @pass: Password to derive from. |
|
||||
* @pass_len: Length of @pass in bytes. |
|
||||
* @salt_in_out: Salt to derive from. If @flags contains the value |
|
||||
* @PBKDF2_HMAC_FLAG_BLOCK_RESERVED then this memory must |
|
||||
* have @PBKDF2_HMAC_EXTRA_LEN of spare room at the end of the salt itself. |
|
||||
* @salt_len: Length of @salt_in_out in bytes, including any extra spare bytes. |
|
||||
* @flags: PBKDF2_HMAC_FLAG_ flag values indicating desired behaviour. |
|
||||
* @cost: The cost of the function. The larger this number, the |
|
||||
* longer the key will take to derive. |
|
||||
* @bytes_out: Destination for the derived pseudorandom key. |
|
||||
* @len: The length of @bytes_out in bytes. This must be a multiple |
|
||||
* of @PBKDF2_HMAC_SHA512_LEN. |
|
||||
* |
|
||||
* Returns 0 on success or non-zero if any parameter is invalid. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_pbkdf2_hmac_sha512( |
|
||||
const unsigned char *pass, |
|
||||
size_t pass_len, |
|
||||
unsigned char *salt_in_out, |
|
||||
size_t salt_len, |
|
||||
uint32_t flags, |
|
||||
uint32_t cost, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len); |
|
||||
|
|
||||
/** The length of a private key used for EC signing */ |
|
||||
#define EC_PRIVATE_KEY_LEN 32 |
|
||||
/** The length of a public key used for EC signing */ |
|
||||
#define EC_PUBLIC_KEY_LEN 33 |
|
||||
/** The length of an uncompressed public key */ |
|
||||
#define EC_PUBLIC_KEY_UNCOMPRESSED_LEN 65 |
|
||||
/** The length of a message hash to EC sign */ |
|
||||
#define EC_MESSAGE_HASH_LEN 32 |
|
||||
/** The length of a compact signature produced by EC signing */ |
|
||||
#define EC_SIGNATURE_LEN 64 |
|
||||
/** The maximum encoded length of a DER encoded signature */ |
|
||||
#define EC_SIGNATURE_DER_MAX_LEN 72 |
|
||||
|
|
||||
/** Indicates that a signature using ECDSA/secp256k1 is required */ |
|
||||
#define EC_FLAG_ECDSA 0x1 |
|
||||
/** Indicates that a signature using EC-Schnorr-SHA256 is required */ |
|
||||
#define EC_FLAG_SCHNORR 0x2 |
|
||||
|
|
||||
|
|
||||
/**
|
|
||||
* Verify that a private key is valid. |
|
||||
* |
|
||||
* @priv_key: The private key to validate. |
|
||||
* @priv_key_len: The length of @priv_key in bytes. Must be @EC_PRIVATE_KEY_LEN. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_ec_private_key_verify( |
|
||||
const unsigned char *priv_key, |
|
||||
size_t priv_key_len); |
|
||||
|
|
||||
/**
|
|
||||
* Create a public key from a private key. |
|
||||
* |
|
||||
* @priv_key: The private key to create a public key from. |
|
||||
* @priv_key_len: The length of @priv_key in bytes. Must be @EC_PRIVATE_KEY_LEN. |
|
||||
* @bytes_out: Destination for the resulting public key. |
|
||||
* @len: The length of @bytes_out in bytes. Must be @EC_PUBLIC_KEY_LEN. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_ec_public_key_from_private_key( |
|
||||
const unsigned char *priv_key, |
|
||||
size_t priv_key_len, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len); |
|
||||
|
|
||||
/**
|
|
||||
* Create an uncompressed public key from a compressed public key. |
|
||||
* |
|
||||
* @pub_key: The private key to create a public key from. |
|
||||
* @pub_key_len: The length of @pub_key in bytes. Must be @EC_PUBLIC_KEY_LEN. |
|
||||
* @bytes_out: Destination for the resulting public key. |
|
||||
* @len: The length of @bytes_out in bytes. Must be @EC_PUBLIC_KEY_UNCOMPRESSED_LEN. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_ec_public_key_decompress( |
|
||||
const unsigned char *pub_key, |
|
||||
size_t pub_key_len, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len); |
|
||||
|
|
||||
/**
|
|
||||
* Sign a message hash with a private key, producing a compact signature. |
|
||||
* |
|
||||
* @priv_key: The private key to sign with. |
|
||||
* @priv_key_len: The length of @priv_key in bytes. Must be @EC_PRIVATE_KEY_LEN. |
|
||||
* @bytes_in: The message hash to sign. |
|
||||
* @len_in: The length of @bytes_in in bytes. Must be @EC_MESSAGE_HASH_LEN. |
|
||||
* @flags: EC_FLAG_ flag values indicating desired behaviour. |
|
||||
* @bytes_out: Destination for the resulting compact signature. |
|
||||
* @len: The length of @bytes_out in bytes. Must be @EC_SIGNATURE_LEN. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_ec_sig_from_bytes( |
|
||||
const unsigned char *priv_key, |
|
||||
size_t priv_key_len, |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
uint32_t flags, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len); |
|
||||
|
|
||||
/**
|
|
||||
* Convert a signature to low-s form. |
|
||||
* |
|
||||
* @sig_in: The compact signature to convert. |
|
||||
* @sig_in_len: The length of @sig_in in bytes. Must be @EC_SIGNATURE_LEN. |
|
||||
* @bytes_out: Destination for the resulting low-s signature. |
|
||||
* @len: The length of @bytes_out in bytes. Must be @EC_SIGNATURE_LEN. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_ec_sig_normalize( |
|
||||
const unsigned char *sig_in, |
|
||||
size_t sig_in_len, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len); |
|
||||
|
|
||||
/**
|
|
||||
* Convert a compact signature to DER encoding. |
|
||||
* |
|
||||
* @sig_in: The compact signature to convert. |
|
||||
* @sig_in_len: The length of @sig_in in bytes. Must be @EC_SIGNATURE_LEN. |
|
||||
* @bytes_out: Destination for the resulting DER encoded signature. |
|
||||
* @len: The length of @bytes_out in bytes. Must be @EC_SIGNATURE_DER_MAX_LEN. |
|
||||
* @written: Destination for the number of bytes written to @bytes_out. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_ec_sig_to_der( |
|
||||
const unsigned char *sig_in, |
|
||||
size_t sig_in_len, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len, |
|
||||
size_t *written); |
|
||||
|
|
||||
/**
|
|
||||
* Convert a DER encoded signature to a compact signature. |
|
||||
* |
|
||||
* @bytes_in: The DER encoded signature to convert. |
|
||||
* @len_in: The length of @sig_in in bytes. |
|
||||
* @bytes_out: Destination for the resulting compact signature. |
|
||||
* @len: The length of @bytes_out in bytes. Must be @EC_SIGNATURE_LEN. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_ec_sig_from_der( |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len); |
|
||||
|
|
||||
/**
|
|
||||
* Verify a signed message hash. |
|
||||
* |
|
||||
* @pub_key: The public key to verify with. |
|
||||
* @pub_key_len: The length of @pub_key in bytes. Must be @EC_PUBLIC_KEY_LEN. |
|
||||
* @bytes_in: The message hash to verify. |
|
||||
* @len_in: The length of @bytes_in in bytes. Must be @EC_MESSAGE_HASH_LEN. |
|
||||
* @flags: EC_FLAG_ flag values indicating desired behaviour. |
|
||||
* @sig_in: The compact signature of the message in @bytes_in. |
|
||||
* @sig_in_len: The length of @sig_in in bytes. Must be @EC_SIGNATURE_LEN. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_ec_sig_verify( |
|
||||
const unsigned char *pub_key, |
|
||||
size_t pub_key_len, |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
uint32_t flags, |
|
||||
const unsigned char *sig_in, |
|
||||
size_t sig_in_len); |
|
||||
|
|
||||
/** The maximim size of input message that can be formatted */ |
|
||||
#define BITCOIN_MESSAGE_MAX_LEN (64 * 1024 - 64) |
|
||||
|
|
||||
/** Indicates that SHA256D(message) should be returned */ |
|
||||
#define BITCOIN_MESSAGE_FLAG_HASH 1 |
|
||||
|
|
||||
/**
|
|
||||
* Format a message for use as a bitcoin signed message. |
|
||||
* |
|
||||
* @bytes_in: The message string to sign. |
|
||||
* @len_in: The length of @bytes_in in bytes. Must be less than |
|
||||
* or equal to BITCOIN_MESSAGE_MAX_LEN. |
|
||||
* @flags: BITCOIN_MESSAGE_FLAG_ flags indicating the desired output. |
|
||||
* if BITCOIN_MESSAGE_FLAG_HASH is passed, the double SHA256 hash |
|
||||
* of the message is placed in @bytes_out instead of the formatted |
|
||||
* message. In this case @len must be at least @SHA256_LEN. |
|
||||
* @bytes_out: Destination for the formatted message or message hash. |
|
||||
* @len: The length of @bytes_out in bytes. |
|
||||
* @written: Destination for the number of bytes written to @bytes_out. |
|
||||
*/ |
|
||||
WALLY_CORE_API int wally_format_bitcoin_message(const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
uint32_t flags, |
|
||||
unsigned char *bytes_out, |
|
||||
size_t len, |
|
||||
size_t *written); |
|
||||
|
|
||||
#endif /* LIBWALLY_CORE_CRYPTO_H */ |
|
@ -1,54 +0,0 @@ |
|||||
"""setuptools config for wallycore """ |
|
||||
from setuptools import setup |
|
||||
from setuptools import Distribution |
|
||||
import os |
|
||||
import subprocess |
|
||||
from distutils.command.build_clib import build_clib as _build_clib |
|
||||
|
|
||||
class Distr(Distribution): |
|
||||
def has_c_libraries(self): |
|
||||
return True |
|
||||
|
|
||||
class build_clib(_build_clib): |
|
||||
def run(self): |
|
||||
abs_path = os.path.dirname(os.path.abspath(__file__)) + '/' |
|
||||
|
|
||||
for cmd in ('./tools/autogen.sh', |
|
||||
'./configure --enable-swig-python', |
|
||||
'make'): |
|
||||
subprocess.check_call(cmd.split(' '), cwd=abs_path) |
|
||||
|
|
||||
setup( |
|
||||
name='wallycore', |
|
||||
|
|
||||
version='0.2.0', |
|
||||
description='libwally Bitcoin library', |
|
||||
long_description='Python bindings for the libwally Bitcoin library', |
|
||||
url='https://github.com/jgriffiths/libwally-core', |
|
||||
author='Jon Griffiths', |
|
||||
author_email='jon_p_griffiths@yahoo.com', |
|
||||
license='MIT', |
|
||||
zip_safe=False, |
|
||||
libraries=[('wallycore',{'sources':['include/wally_core.h']})], |
|
||||
cmdclass={ |
|
||||
'build_clib': build_clib, |
|
||||
}, |
|
||||
|
|
||||
classifiers=[ |
|
||||
'Development Status :: 3 - Alpha', |
|
||||
|
|
||||
'Intended Audience :: Developers', |
|
||||
'Topic :: Software Development :: Libraries', |
|
||||
|
|
||||
'License :: OSI Approved :: MIT License', |
|
||||
|
|
||||
'Programming Language :: Python :: 2.7', |
|
||||
'Programming Language :: Python :: 3.5', |
|
||||
], |
|
||||
|
|
||||
keywords='Bitcoin wallet BIP32 BIP38 BIP39 secp256k1', |
|
||||
|
|
||||
packages=['wallycore'], |
|
||||
package_dir={'':'src/swig_python'}, |
|
||||
data_files=[('', ['src/.libs/libwallycore.so'])] , |
|
||||
) |
|
@ -1,150 +0,0 @@ |
|||||
LIBSECP256K1=secp256k1/libsecp256k1.la |
|
||||
|
|
||||
$(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*) |
|
||||
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) |
|
||||
|
|
||||
noinst_LTLIBRARIES = |
|
||||
|
|
||||
if USE_SWIG_PYTHON |
|
||||
noinst_LTLIBRARIES += libswig_python.la |
|
||||
libswig_python_la_SOURCES = swig_python/swig_python_wrap.c |
|
||||
|
|
||||
libswig_python_la_CFLAGS = -I$(top_srcdir) $(AM_CFLAGS) $(SWIG_PYTHON_CPPFLAGS) $(SWIG_WARN_CFLAGS) $(NOALIAS_CFLAGS) |
|
||||
libswig_python_la_LIBADD = $(PYTHON_LIBS) |
|
||||
|
|
||||
# We must sed the wrapper to workaround SWIGs odd library naming conventions
|
|
||||
swig_python/swig_python_wrap.c : swig_python/swig.i swig_python/python_extra.py_in |
|
||||
$(AM_V_at)$(SWIG) $(SWIG_PYTHON_OPT) -outdir swig_python -o $@ $< && \
|
|
||||
$(GNU_SED) -i 's/_wallycore/libwallycore/g' swig_python/wallycore.py $@ && \
|
|
||||
cat swig_python/wallycore.py swig_python/python_extra.py_in > swig_python/wallycore/__init__.py && \
|
|
||||
rm swig_python/wallycore.py |
|
||||
|
|
||||
PYTHON_TEST = PYTHONDONTWRITEBYTECODE=1 $(PYTHON) |
|
||||
PYTHON_SWIGTEST = PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=.libs:swig_python $(PYTHON) |
|
||||
|
|
||||
.PHONY: clean-swig-python |
|
||||
clean-swig-python: |
|
||||
$(AM_V_at)rm -f swig_python/swig_python_wrap.c swig_python/wallycore/__init__.py |
|
||||
clean-local: clean-swig-python |
|
||||
|
|
||||
if IS_OSX |
|
||||
# Python requires the shared library have a .so extension for 'import'
|
|
||||
.libs/libwallycore.so: |
|
||||
$(AM_V_at)ln -s libwallycore.dylib .libs/libwallycore.so |
|
||||
SWIG_PYTHON_TEST_DEPS = .libs/libwallycore.so |
|
||||
endif |
|
||||
|
|
||||
endif |
|
||||
|
|
||||
if USE_SWIG_JAVA |
|
||||
noinst_LTLIBRARIES += libswig_java.la |
|
||||
libswig_java_la_SOURCES = \
|
|
||||
swig_java/swig_java_wrap.c |
|
||||
|
|
||||
libswig_java_la_CFLAGS = -I$(top_srcdir) $(AM_CFLAGS) $(SWIG_JAVA_CPPFLAGS) $(SWIG_WARN_CFLAGS) |
|
||||
|
|
||||
SWIG_JOPT = $(SWIG_JAVA_OPT) -outdir swig_java -noproxy -package com.blockstream.libwally |
|
||||
|
|
||||
swig_java/swig_java_wrap.c: swig_java/swig.i swig_java/jni_extra.java_in |
|
||||
$(AM_V_at)$(SWIG) $(SWIG_JOPT) -o $@ $< && \
|
|
||||
$(GNU_SED) -i 's/wallycoreJNI/Wally/g' $@ && \
|
|
||||
$(GNU_SED) -i 's/ = (char \*) (\*jenv)->Get/ = (unsigned char \*) (\*jenv)->Get/g' $@ |
|
||||
|
|
||||
cblw=com/blockstream/libwally |
|
||||
cbt=com/blockstream/test |
|
||||
sjs=swig_java/src |
|
||||
$(sjs)/$(cblw)/Wally.java: swig_java/swig_java_wrap.c |
|
||||
$(AM_V_at)$(top_srcdir)/tools/swigjavapost.sh @GNU_SED@ |
|
||||
|
|
||||
$(sjs)/$(cblw)/Wally.class: $(sjs)/$(cblw)/Wally.java |
|
||||
$(AM_V_at)$(JAVAC) -implicit:none -source $(JAVAC_TARGET) -target $(JAVAC_TARGET) -sourcepath $(sjs)/$(cblw)/ $(sjs)/$(cblw)/Wally.java |
|
||||
|
|
||||
swig_java/wallycore.jar: $(sjs)/$(cblw)/Wally.class |
|
||||
$(AM_V_at)$(JAR) cf swig_java/wallycore.jar -C $(sjs) '$(cblw)/Wally$$Obj.class' -C $(sjs) '$(cblw)/Wally.class' |
|
||||
|
|
||||
$(sjs)/$(cbt)/%.class: $(sjs)/$(cbt)/%.java swig_java/wallycore.jar |
|
||||
$(AM_V_at)$(JAVAC) -implicit:none -source $(JAVAC_TARGET) -target $(JAVAC_TARGET) -sourcepath $(sjs) $(filter %.java,$^) |
|
||||
|
|
||||
if HAVE_JAVAC |
|
||||
all: swig_java/wallycore.jar |
|
||||
|
|
||||
SWIG_JAVA_TEST_DEPS = $(sjs)/$(cbt)/test_bip32.class $(sjs)/$(cbt)/test_mnemonic.class |
|
||||
|
|
||||
all: $(SWIG_JAVA_TEST_DEPS) |
|
||||
|
|
||||
JAVA_TEST = @LDPATH_VAR@=.libs $(JAVA) -Djava.library.path=.libs -classpath $(sjs) com.blockstream.test. |
|
||||
|
|
||||
endif # HAVE_JAVAC
|
|
||||
|
|
||||
.PHONY: clean-swig-java |
|
||||
clean-swig-java: |
|
||||
$(AM_V_at)rm -rf swig_java/swig_java_wrap.c $(sjs)/$(cblw) $(sjs)/$(cbt)/*.class swig_java/*.java swig_java/*.jar |
|
||||
clean-local: clean-swig-java |
|
||||
endif # USE_SWIG_JAVA
|
|
||||
|
|
||||
lib_LTLIBRARIES = libwallycore.la |
|
||||
|
|
||||
libwallycore_la_SOURCES = \
|
|
||||
aes.c \
|
|
||||
base58.c \
|
|
||||
bip32.c \
|
|
||||
bip38.c \
|
|
||||
bip39.c \
|
|
||||
hex.c \
|
|
||||
hmac.c \
|
|
||||
internal.c \
|
|
||||
mnemonic.c \
|
|
||||
pbkdf2.c \
|
|
||||
scrypt.c \
|
|
||||
sign.c \
|
|
||||
wordlist.c \
|
|
||||
ccan/ccan/crypto/ripemd160/ripemd160.c \
|
|
||||
ccan/ccan/crypto/sha256/sha256.c \
|
|
||||
ccan/ccan/crypto/sha512/sha512.c \
|
|
||||
ccan/ccan/str/hex/hex.c |
|
||||
|
|
||||
libwallycore_la_INCLUDES = \
|
|
||||
include/wally_bip32.h \
|
|
||||
include/wally_bip38.h \
|
|
||||
include/wally_bip39.h \
|
|
||||
include/wally_core.h \
|
|
||||
include/wally-crypto.h |
|
||||
|
|
||||
libwallycore_la_CFLAGS = -I$(top_srcdir) -Iccan -DWALLY_CORE_BUILD=1 $(AM_CFLAGS) |
|
||||
libwallycore_la_LIBADD = $(LIBADD_SECP256K1) $(noinst_LTLIBRARIES) |
|
||||
|
|
||||
SUBDIRS = secp256k1 |
|
||||
|
|
||||
TESTS = |
|
||||
if USE_PTHREAD |
|
||||
TESTS += test_clear |
|
||||
noinst_PROGRAMS = test_clear |
|
||||
test_clear_SOURCES = ctest/test_clear.c |
|
||||
test_clear_CFLAGS = -I$(top_srcdir)/include $(PTHREAD_CFLAGS) $(AM_CFLAGS) |
|
||||
test_clear_LIBS = $(PTHREAD_LIBS) |
|
||||
test_clear_LDADD = $(lib_LTLIBRARIES) $(libwallycore_la_LIBADD) |
|
||||
endif |
|
||||
|
|
||||
check-local: $(SWIG_PYTHON_TEST_DEPS) $(SWIG_JAVA_TEST_DEPS) |
|
||||
if RUN_PYTHON_TESTS |
|
||||
$(AM_V_at)$(PYTHON_TEST) test/test_aes.py |
|
||||
$(AM_V_at)$(PYTHON_TEST) test/test_base58.py |
|
||||
$(AM_V_at)$(PYTHON_TEST) test/test_bip32.py |
|
||||
$(AM_V_at)$(PYTHON_TEST) test/test_bip38.py |
|
||||
$(AM_V_at)$(PYTHON_TEST) test/test_bip39.py |
|
||||
$(AM_V_at)$(PYTHON_TEST) test/test_hash.py |
|
||||
$(AM_V_at)$(PYTHON_TEST) test/test_hex.py |
|
||||
$(AM_V_at)$(PYTHON_TEST) test/test_hmac.py |
|
||||
$(AM_V_at)$(PYTHON_TEST) test/test_mnemonic.py |
|
||||
$(AM_V_at)$(PYTHON_TEST) test/test_pbkdf2.py |
|
||||
$(AM_V_at)$(PYTHON_TEST) test/test_scrypt.py |
|
||||
$(AM_V_at)$(PYTHON_TEST) test/test_sign.py |
|
||||
$(AM_V_at)$(PYTHON_TEST) test/test_wordlist.py |
|
||||
if USE_SWIG_PYTHON |
|
||||
$(AM_V_at)$(PYTHON_SWIGTEST) swig_python/contrib/mnemonic.py |
|
||||
endif |
|
||||
endif # RUN_PYTHON_TESTS
|
|
||||
if RUN_JAVA_TESTS |
|
||||
$(AM_V_at)$(JAVA_TEST)test_bip32 |
|
||||
$(AM_V_at)$(JAVA_TEST)test_mnemonic |
|
||||
endif |
|
@ -1,179 +0,0 @@ |
|||||
#include "internal.h" |
|
||||
#include <include/wally_crypto.h> |
|
||||
#include <stdbool.h> |
|
||||
|
|
||||
#include "ctaes/ctaes.h" |
|
||||
#include "ctaes/ctaes.c" |
|
||||
|
|
||||
#define ALL_OPS (AES_FLAG_ENCRYPT | AES_FLAG_DECRYPT) |
|
||||
|
|
||||
static bool is_valid_key_len(size_t key_len) |
|
||||
{ |
|
||||
return key_len == AES_KEY_LEN_128 || key_len == AES_KEY_LEN_192 || |
|
||||
key_len == AES_KEY_LEN_256; |
|
||||
} |
|
||||
|
|
||||
static bool are_valid_args(const unsigned char *key, size_t key_len, |
|
||||
const unsigned char *bytes_in, uint32_t flags) |
|
||||
{ |
|
||||
return key && is_valid_key_len(key_len) && bytes_in && |
|
||||
(flags & ALL_OPS) != ALL_OPS; |
|
||||
} |
|
||||
|
|
||||
static void aes_enc(AES256_ctx *ctx, |
|
||||
const unsigned char *key, size_t key_len, |
|
||||
const unsigned char *bytes_in, size_t len_in, |
|
||||
unsigned char *bytes_out) |
|
||||
{ |
|
||||
len_in /= AES_BLOCK_LEN; |
|
||||
|
|
||||
switch (key_len) { |
|
||||
case AES_KEY_LEN_128: |
|
||||
AES128_init((AES128_ctx *)ctx, key); |
|
||||
AES128_encrypt((AES128_ctx *)ctx, len_in, bytes_out, bytes_in); |
|
||||
break; |
|
||||
|
|
||||
case AES_KEY_LEN_192: |
|
||||
AES192_init((AES192_ctx *)ctx, key); |
|
||||
AES192_encrypt((AES192_ctx *)ctx, len_in, bytes_out, bytes_in); |
|
||||
break; |
|
||||
|
|
||||
case AES_KEY_LEN_256: |
|
||||
AES256_init(ctx, key); |
|
||||
AES256_encrypt(ctx, len_in, bytes_out, bytes_in); |
|
||||
break; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
static void aes_dec(AES256_ctx *ctx, |
|
||||
const unsigned char *key, size_t key_len, |
|
||||
const unsigned char *bytes_in, size_t len_in, |
|
||||
unsigned char *bytes_out) |
|
||||
{ |
|
||||
len_in /= AES_BLOCK_LEN; |
|
||||
|
|
||||
switch (key_len) { |
|
||||
case AES_KEY_LEN_128: |
|
||||
AES128_init((AES128_ctx *)ctx, key); |
|
||||
AES128_decrypt((AES128_ctx *)ctx, len_in, bytes_out, bytes_in); |
|
||||
break; |
|
||||
|
|
||||
case AES_KEY_LEN_192: |
|
||||
AES192_init((AES192_ctx *)ctx, key); |
|
||||
AES192_decrypt((AES192_ctx *)ctx, len_in, bytes_out, bytes_in); |
|
||||
break; |
|
||||
|
|
||||
case AES_KEY_LEN_256: |
|
||||
AES256_init(ctx, key); |
|
||||
AES256_decrypt(ctx, len_in, bytes_out, bytes_in); |
|
||||
break; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
int wally_aes(const unsigned char *key, size_t key_len, |
|
||||
const unsigned char *bytes_in, size_t len_in, |
|
||||
uint32_t flags, |
|
||||
unsigned char *bytes_out, size_t len) |
|
||||
{ |
|
||||
AES256_ctx ctx; |
|
||||
|
|
||||
if (!are_valid_args(key, key_len, bytes_in, flags) || |
|
||||
len % AES_BLOCK_LEN || !len_in || len_in % AES_BLOCK_LEN || |
|
||||
flags & ~ALL_OPS || !bytes_out || !len) |
|
||||
return WALLY_EINVAL; |
|
||||
|
|
||||
if (flags & AES_FLAG_ENCRYPT) |
|
||||
aes_enc(&ctx, key, key_len, bytes_in, len_in, bytes_out); |
|
||||
else |
|
||||
aes_dec(&ctx, key, key_len, bytes_in, len_in, bytes_out); |
|
||||
|
|
||||
clear(&ctx, sizeof(ctx)); |
|
||||
return WALLY_OK; |
|
||||
} |
|
||||
|
|
||||
int wally_aes_cbc(const unsigned char *key, size_t key_len, |
|
||||
const unsigned char *iv, size_t iv_len, |
|
||||
const unsigned char *bytes_in, size_t len_in, |
|
||||
uint32_t flags, |
|
||||
unsigned char *bytes_out, size_t len, |
|
||||
size_t *written) |
|
||||
{ |
|
||||
unsigned char buf[AES_BLOCK_LEN]; |
|
||||
AES256_ctx ctx; |
|
||||
size_t i, n, blocks; |
|
||||
unsigned char remainder; |
|
||||
|
|
||||
if (written) |
|
||||
*written = 0; |
|
||||
|
|
||||
if (!are_valid_args(key, key_len, bytes_in, flags) || |
|
||||
((flags & AES_FLAG_ENCRYPT) && (len % AES_BLOCK_LEN)) || |
|
||||
((flags & AES_FLAG_DECRYPT) && (len_in % AES_BLOCK_LEN)) || |
|
||||
!iv || iv_len != AES_BLOCK_LEN || flags & ~ALL_OPS || !written) |
|
||||
return WALLY_EINVAL; |
|
||||
|
|
||||
blocks = len_in / AES_BLOCK_LEN; |
|
||||
|
|
||||
if (flags & AES_FLAG_ENCRYPT) { |
|
||||
/* Determine output length from input length */ |
|
||||
remainder = len_in % AES_BLOCK_LEN; |
|
||||
*written = (blocks + 1) * AES_BLOCK_LEN; |
|
||||
} else { |
|
||||
/* Determine output length from decrypted final block */ |
|
||||
const unsigned char *last = bytes_in + len_in - AES_BLOCK_LEN; |
|
||||
const unsigned char *prev = last - AES_BLOCK_LEN; |
|
||||
|
|
||||
if (!--blocks) |
|
||||
prev = iv; |
|
||||
aes_dec(&ctx, key, key_len, last, AES_BLOCK_LEN, buf); |
|
||||
for (n = 0; n < AES_BLOCK_LEN; ++n) |
|
||||
buf[n] = prev[n] ^ buf[n]; |
|
||||
|
|
||||
/* Modulo the resulting padding amount to the block size - we do
|
|
||||
* not attempt to verify the decryption by checking the padding in |
|
||||
* the decrypted block. */ |
|
||||
remainder = AES_BLOCK_LEN - (buf[AES_BLOCK_LEN - 1] % AES_BLOCK_LEN); |
|
||||
if (remainder == AES_BLOCK_LEN) |
|
||||
remainder = 0; |
|
||||
*written = blocks * AES_BLOCK_LEN + remainder; |
|
||||
} |
|
||||
if (len < *written || !*written) |
|
||||
goto finish; /* Inform caller how much space is needed */ |
|
||||
|
|
||||
if (!bytes_out) { |
|
||||
clear_n(2, buf, sizeof(buf), &ctx, sizeof(ctx)); |
|
||||
return WALLY_EINVAL; |
|
||||
} |
|
||||
|
|
||||
if (flags & AES_FLAG_DECRYPT) |
|
||||
memcpy(bytes_out + blocks * AES_BLOCK_LEN, buf, remainder); |
|
||||
|
|
||||
for (i = 0; i < blocks; ++i) { |
|
||||
if (flags & AES_FLAG_ENCRYPT) { |
|
||||
for (n = 0; n < AES_BLOCK_LEN; ++n) |
|
||||
buf[n] = bytes_in[n] ^ iv[n]; |
|
||||
aes_enc(&ctx, key, key_len, buf, AES_BLOCK_LEN, bytes_out); |
|
||||
iv = bytes_out; |
|
||||
} else { |
|
||||
aes_dec(&ctx, key, key_len, bytes_in, AES_BLOCK_LEN, bytes_out); |
|
||||
for (n = 0; n < AES_BLOCK_LEN; ++n) |
|
||||
bytes_out[n] = bytes_out[n] ^ iv[n]; |
|
||||
iv = bytes_in; |
|
||||
} |
|
||||
bytes_in += AES_BLOCK_LEN; |
|
||||
bytes_out += AES_BLOCK_LEN; |
|
||||
} |
|
||||
|
|
||||
if (flags & AES_FLAG_ENCRYPT) { |
|
||||
for (n = 0; n < remainder; ++n) |
|
||||
buf[n] = bytes_in[n] ^ iv[n]; |
|
||||
remainder = 16 - remainder; |
|
||||
for (; n < AES_BLOCK_LEN; ++n) |
|
||||
buf[n] = remainder ^ iv[n]; |
|
||||
aes_enc(&ctx, key, key_len, buf, AES_BLOCK_LEN, bytes_out); |
|
||||
} |
|
||||
|
|
||||
finish: |
|
||||
clear_n(2, buf, sizeof(buf), &ctx, sizeof(ctx)); |
|
||||
return WALLY_OK; |
|
||||
} |
|
@ -1,290 +0,0 @@ |
|||||
#include "internal.h" |
|
||||
#include "base58.h" |
|
||||
#include "ccan/ccan/crypto/sha256/sha256.h" |
|
||||
#include "ccan/ccan/endian/endian.h" |
|
||||
#include <include/wally_crypto.h> |
|
||||
|
|
||||
/* Temporary stack buffer sizes */ |
|
||||
#define BIGNUM_WORDS 128u |
|
||||
#define BIGNUM_BYTES (BIGNUM_WORDS * sizeof(uint32_t)) |
|
||||
#define BASE58_ALL_DEFINED_FLAGS (BASE58_FLAG_CHECKSUM) |
|
||||
|
|
||||
static const unsigned char base58_to_byte[256] = { |
|
||||
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, 0x00, /* ........ */ |
|
||||
|
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ |
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ |
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* .1234567 */ |
|
||||
0x08, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 89...... */ |
|
||||
|
|
||||
0x00, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, /* .ABCDEFG */ |
|
||||
0x11, 0x00, 0x12, 0x13, 0x14, 0x15, 0x16, 0x00, /* H.JKLMN. */ |
|
||||
0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, /* PQRSTUVW */ |
|
||||
0x1F, 0x20, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, /* XYZ..... */ |
|
||||
|
|
||||
0x00, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, /* .abcdefg */ |
|
||||
0x29, 0x2A, 0x2B, 0x2C, 0x00, 0x2D, 0x2E, 0x2F, /* hijk.mno */ |
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* pqrstuvx */ |
|
||||
0x38, 0x39, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, /* xyz..... */ |
|
||||
|
|
||||
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, 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, 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, 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, 0x00, 0x00, 0x00, 0x00, /* ........ */ |
|
||||
}; |
|
||||
|
|
||||
static const char byte_to_base58[58] = { |
|
||||
'1', '2', '3', '4', '5', '6', '7', '8', |
|
||||
'9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', |
|
||||
'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', |
|
||||
'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', |
|
||||
'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', |
|
||||
'h', 'i', 'j', 'k', 'm', 'n', 'o', 'p', |
|
||||
'q', 'r', 's', 't', 'u', 'v', 'w', 'x', |
|
||||
'y','z' |
|
||||
}; |
|
||||
|
|
||||
/* Returns non-zero on error. If 0 is returned then:
|
|
||||
* *len <= input value - OK, bytes_out contains data. |
|
||||
* *len > input value - Failed and bytes_out untouched. |
|
||||
*/ |
|
||||
static int base58_decode(const char *base58, size_t base58_len, |
|
||||
unsigned char *bytes_out, size_t *len) |
|
||||
{ |
|
||||
uint32_t bn_buf[BIGNUM_WORDS]; |
|
||||
uint32_t *bn = bn_buf, *top_word, *bn_p; |
|
||||
size_t bn_words = 0, ones, cp_len, i; |
|
||||
unsigned char *cp; |
|
||||
int ret = WALLY_EINVAL; |
|
||||
|
|
||||
if (!base58 || !base58_len) |
|
||||
return WALLY_EINVAL; /* Empty string can't be decoded or represented */ |
|
||||
|
|
||||
/* Process leading '1's */ |
|
||||
for (ones = 0; ones < base58_len && base58[ones] == '1'; ++ones) |
|
||||
; /* no-op*/ |
|
||||
|
|
||||
if (!(base58_len -= ones)) { |
|
||||
if (bytes_out && ones <= *len) |
|
||||
memset(bytes_out, 0, ones); |
|
||||
*len = ones; |
|
||||
return WALLY_OK; /* String of all '1's */ |
|
||||
} |
|
||||
base58 += ones; /* Skip over leading '1's */ |
|
||||
|
|
||||
/* Take 6 bits to store each 58 bit number, rounded up to the next byte,
|
|
||||
* then round that up to a uint32_t word boundary. */ |
|
||||
bn_words = ((base58_len * 6 + 7) / 8 + 3) / 4; |
|
||||
|
|
||||
/* Allocate our bignum buffer if it won't fit on the stack */ |
|
||||
if (bn_words > BIGNUM_WORDS) |
|
||||
if (!(bn = wally_malloc(bn_words * sizeof(*bn)))) { |
|
||||
ret = WALLY_ENOMEM; |
|
||||
goto cleanup; |
|
||||
} |
|
||||
|
|
||||
/* Iterate through the characters adding them to our bignum. We keep
|
|
||||
* track of the current top word to avoid iterating over words that |
|
||||
* we know are zero. */ |
|
||||
top_word = bn + bn_words - 1; |
|
||||
*top_word = 0; |
|
||||
|
|
||||
for (i = 0; i < base58_len; ++i) { |
|
||||
unsigned char byte = base58_to_byte[((unsigned char *)base58)[i]]; |
|
||||
if (!byte--) |
|
||||
goto cleanup; /* Invalid char */ |
|
||||
|
|
||||
for (bn_p = bn + bn_words - 1; bn_p >= top_word; --bn_p) { |
|
||||
uint64_t mult = *bn_p * 58ull + byte; |
|
||||
*bn_p = mult & 0xffffffff; |
|
||||
byte = (mult >> 32) & 0xff; |
|
||||
if (byte && bn_p == top_word) { |
|
||||
*--top_word = byte; /* Increase bignum size */ |
|
||||
break; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
/* We have our bignum stored from top_word to bn + bn_words - 1. Convert
|
|
||||
* its words to big-endian so we can simply memcpy it to bytes_out. */ |
|
||||
for (bn_p = top_word; bn_p < bn + bn_words; ++bn_p) |
|
||||
*bn_p = cpu_to_be32(*bn_p); /* No-op on big-endian machines */ |
|
||||
|
|
||||
for (cp = (unsigned char *)top_word; !*cp; ++cp) |
|
||||
; /* Skip leading zero bytes in our bignum */ |
|
||||
|
|
||||
/* Copy the result if it fits, cleanup and return */ |
|
||||
cp_len = (unsigned char *)(bn + bn_words) - cp; |
|
||||
|
|
||||
if (bytes_out && ones + cp_len <= *len) { |
|
||||
memset(bytes_out, 0, ones); |
|
||||
memcpy(bytes_out + ones, cp, cp_len); |
|
||||
} |
|
||||
|
|
||||
*len = ones + cp_len; |
|
||||
ret = WALLY_OK; |
|
||||
|
|
||||
cleanup: |
|
||||
clear(bn, bn_words * sizeof(*bn)); |
|
||||
if (bn != bn_buf) |
|
||||
wally_free(bn); |
|
||||
return ret; |
|
||||
} |
|
||||
|
|
||||
uint32_t base58_get_checksum(const unsigned char *bytes_in, size_t len_in) |
|
||||
{ |
|
||||
struct sha256 sha; |
|
||||
uint32_t checksum; |
|
||||
|
|
||||
wally_sha256d(bytes_in, len_in, (unsigned char *)&sha, sizeof(sha)); |
|
||||
checksum = sha.u.u32[0]; |
|
||||
clear(&sha, sizeof(sha)); |
|
||||
return checksum; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
int wally_base58_from_bytes(const unsigned char *bytes_in, size_t len_in, |
|
||||
uint32_t flags, char **output) |
|
||||
{ |
|
||||
uint32_t checksum, *cs_p = NULL; |
|
||||
unsigned char bn_buf[BIGNUM_BYTES]; |
|
||||
unsigned char *bn = bn_buf, *top_byte, *bn_p; |
|
||||
size_t bn_bytes = 0, zeros, i, orig_len = len_in; |
|
||||
int ret = WALLY_EINVAL; |
|
||||
|
|
||||
if (*output) |
|
||||
*output = NULL; |
|
||||
|
|
||||
if (!bytes_in || !len_in || (flags & ~BASE58_ALL_DEFINED_FLAGS) || !output) |
|
||||
goto cleanup; /* Invalid argument */ |
|
||||
|
|
||||
if (flags & BASE58_FLAG_CHECKSUM) { |
|
||||
checksum = base58_get_checksum(bytes_in, len_in); |
|
||||
cs_p = &checksum; |
|
||||
len_in += 4; |
|
||||
} |
|
||||
|
|
||||
#define b(n) (n < orig_len ? bytes_in[n] : ((unsigned char *)cs_p)[n - orig_len]) |
|
||||
|
|
||||
/* Process leading zeros */ |
|
||||
for (zeros = 0; zeros < len_in && !b(zeros); ++zeros) |
|
||||
; /* no-op*/ |
|
||||
|
|
||||
if (zeros == len_in) { |
|
||||
if (!(*output = wally_malloc(zeros + 1))) { |
|
||||
ret = WALLY_ENOMEM; |
|
||||
goto cleanup; |
|
||||
} |
|
||||
|
|
||||
memset(*output, '1', zeros); |
|
||||
(*output)[zeros] = '\0'; |
|
||||
return WALLY_OK; /* All 0's */ |
|
||||
} |
|
||||
|
|
||||
bn_bytes = (len_in - zeros) * 138 / 100 + 1; /* log(256)/log(58) rounded up */ |
|
||||
|
|
||||
/* Allocate our bignum buffer if it won't fit on the stack */ |
|
||||
if (bn_bytes > BIGNUM_BYTES) |
|
||||
if (!(bn = wally_malloc(bn_bytes))) { |
|
||||
ret = WALLY_ENOMEM; |
|
||||
goto cleanup; |
|
||||
} |
|
||||
|
|
||||
top_byte = bn + bn_bytes - 1; |
|
||||
*top_byte = 0; |
|
||||
|
|
||||
for (i = zeros; i < len_in; ++i) { |
|
||||
uint32_t carry = b(i); |
|
||||
for (bn_p = bn + bn_bytes - 1; bn_p >= top_byte; --bn_p) { |
|
||||
carry = *bn_p * 256 + carry; |
|
||||
*bn_p = carry % 58; |
|
||||
carry = carry / 58; |
|
||||
if (carry && bn_p == top_byte) |
|
||||
*--top_byte = 0; /* Increase bignum size */ |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
while (!*top_byte && top_byte < bn + bn_bytes - 1) |
|
||||
++top_byte; /* Skip leading zero bytes in our bignum */ |
|
||||
|
|
||||
/* Copy the result */ |
|
||||
bn_bytes = bn + bn_bytes - top_byte; |
|
||||
|
|
||||
if (!(*output = wally_malloc(zeros + bn_bytes + 1))) { |
|
||||
ret = WALLY_ENOMEM; |
|
||||
goto cleanup; |
|
||||
} |
|
||||
|
|
||||
memset(*output, '1', zeros); |
|
||||
for (i = 0; i < bn_bytes; ++i) |
|
||||
(*output)[zeros + i] = byte_to_base58[top_byte[i]]; |
|
||||
(*output)[zeros + bn_bytes] = '\0'; |
|
||||
|
|
||||
ret = WALLY_OK; |
|
||||
|
|
||||
cleanup: |
|
||||
clear(bn, bn_bytes); |
|
||||
if (bn != bn_buf) |
|
||||
wally_free(bn); |
|
||||
return ret; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
int wally_base58_get_length(const char *str_in, size_t *written) |
|
||||
{ |
|
||||
return base58_decode(str_in, strlen(str_in), NULL, written); |
|
||||
} |
|
||||
|
|
||||
int wally_base58_to_bytes(const char *str_in, uint32_t flags, |
|
||||
unsigned char *bytes_out, size_t len, |
|
||||
size_t *written) |
|
||||
{ |
|
||||
int ret; |
|
||||
|
|
||||
if (written) |
|
||||
*written = 0; |
|
||||
|
|
||||
if (!str_in || flags & ~BASE58_ALL_DEFINED_FLAGS || |
|
||||
!bytes_out || !len || !written) |
|
||||
return WALLY_EINVAL; |
|
||||
|
|
||||
if (flags & BASE58_FLAG_CHECKSUM && len <= BASE58_CHECKSUM_LEN) |
|
||||
return WALLY_EINVAL; /* No room for checksum */ |
|
||||
|
|
||||
*written = len; |
|
||||
ret = base58_decode(str_in, strlen(str_in), bytes_out, written); |
|
||||
if (!ret && *written > len) |
|
||||
return WALLY_OK; /* not enough space, return required amount */ |
|
||||
|
|
||||
if (!ret && (flags & BASE58_FLAG_CHECKSUM)) { |
|
||||
size_t offset = *written - BASE58_CHECKSUM_LEN; |
|
||||
uint32_t checksum = base58_get_checksum(bytes_out, offset); |
|
||||
|
|
||||
if (memcmp(bytes_out + offset, &checksum, sizeof(checksum))) { |
|
||||
clear(bytes_out, len); |
|
||||
return WALLY_EINVAL; /* Checksum mismatch */ |
|
||||
} |
|
||||
|
|
||||
clear(bytes_out + offset, BASE58_CHECKSUM_LEN); |
|
||||
*written -= BASE58_CHECKSUM_LEN; |
|
||||
} |
|
||||
return ret; |
|
||||
} |
|
@ -1,14 +0,0 @@ |
|||||
#ifndef LIBWALLY_BASE58_H |
|
||||
#define LIBWALLY_BASE58_H |
|
||||
|
|
||||
/**
|
|
||||
* Calculate the base58 checksum of a block of binary data. |
|
||||
* |
|
||||
* @bytes_in: Binary data to calculate the checksum for. |
|
||||
* @len: The length of @bytes_in in bytes. |
|
||||
*/ |
|
||||
uint32_t base58_get_checksum( |
|
||||
const unsigned char *bytes_in, |
|
||||
size_t len); |
|
||||
|
|
||||
#endif /* LIBWALLY_BASE58_H */ |
|
@ -1,678 +0,0 @@ |
|||||
#include "internal.h" |
|
||||
#include "hmac.h" |
|
||||
#include "ccan/ccan/crypto/ripemd160/ripemd160.h" |
|
||||
#include "ccan/ccan/crypto/sha256/sha256.h" |
|
||||
#include "ccan/ccan/crypto/sha512/sha512.h" |
|
||||
#include "ccan/ccan/endian/endian.h" |
|
||||
#include "ccan/ccan/build_assert/build_assert.h" |
|
||||
#include <include/wally_bip32.h> |
|
||||
#include <include/wally_crypto.h> |
|
||||
#include "bip32_int.h" |
|
||||
#include <stdbool.h> |
|
||||
|
|
||||
#define BIP32_ALL_DEFINED_FLAGS (BIP32_FLAG_KEY_PRIVATE | BIP32_FLAG_KEY_PUBLIC | BIP32_FLAG_SKIP_HASH) |
|
||||
|
|
||||
static const unsigned char SEED[] = { |
|
||||
'B', 'i', 't', 'c', 'o', 'i', 'n', ' ', 's', 'e', 'e', 'd' |
|
||||
}; |
|
||||
|
|
||||
/* LCOV_EXCL_START */ |
|
||||
/* Check assumptions we expect to hold true */ |
|
||||
static void assert_assumptions(void) |
|
||||
{ |
|
||||
#define key_off(member) offsetof(struct ext_key, member) |
|
||||
#define key_size(member) sizeof(((struct ext_key *)0)->member) |
|
||||
|
|
||||
/* Our ripend buffers must be uint32_t aligned and the correct size */ |
|
||||
BUILD_ASSERT(key_off(parent160) % sizeof(uint32_t) == 0); |
|
||||
BUILD_ASSERT(key_off(hash160) % sizeof(uint32_t) == 0); |
|
||||
BUILD_ASSERT(key_size(parent160) == sizeof(struct ripemd160)); |
|
||||
BUILD_ASSERT(key_size(hash160) == sizeof(struct ripemd160)); |
|
||||
BUILD_ASSERT(key_size(priv_key) == EC_PRIVATE_KEY_LEN + 1); |
|
||||
|
|
||||
/* Our keys following the parity byte must be uint64_t aligned */ |
|
||||
BUILD_ASSERT((key_off(priv_key) + 1) % sizeof(uint64_t) == 0); |
|
||||
BUILD_ASSERT((key_off(pub_key) + 1) % sizeof(uint64_t) == 0); |
|
||||
|
|
||||
/* child_num must be contigous after priv_key */ |
|
||||
BUILD_ASSERT((key_off(priv_key) + key_size(priv_key)) == key_off(child_num)); |
|
||||
|
|
||||
/* We use priv_key[0] to determine if this extended key is public or
|
|
||||
* private, If priv_key[0] is BIP32_FLAG_KEY_PRIVATE then this key is private |
|
||||
* with a computed public key present. If set to BIP32_FLAG_KEY_PUBLIC then |
|
||||
* this is a public key with no private key (A BIP32 'neutered' key). |
|
||||
* |
|
||||
* For this to work BIP32_FLAG_KEY_PRIVATE must be zero so the whole 33 byte |
|
||||
* private key is valid when serialized, and BIP32_FLAG_KEY_PUBLIC cannot be |
|
||||
* 2 or 3 as they are valid parity bytes for public keys. |
|
||||
*/ |
|
||||
BUILD_ASSERT(BIP32_FLAG_KEY_PRIVATE == 0); |
|
||||
BUILD_ASSERT(BIP32_FLAG_KEY_PUBLIC != BIP32_FLAG_KEY_PRIVATE && |
|
||||
BIP32_FLAG_KEY_PUBLIC != 2u && |
|
||||
BIP32_FLAG_KEY_PUBLIC != 3u); |
|
||||
} |
|
||||
/* LCOV_EXCL_STOP */ |
|
||||
|
|
||||
static bool mem_is_zero(const void *mem, size_t len) |
|
||||
{ |
|
||||
size_t i; |
|
||||
for (i = 0; i < len; ++i) |
|
||||
if (((const unsigned char *)mem)[i]) |
|
||||
return false; |
|
||||
return true; |
|
||||
} |
|
||||
|
|
||||
static bool child_is_hardened(uint32_t child_num) |
|
||||
{ |
|
||||
return child_num >= BIP32_INITIAL_HARDENED_CHILD; |
|
||||
} |
|
||||
|
|
||||
static bool version_is_valid(uint32_t ver, uint32_t flags) |
|
||||
{ |
|
||||
if (ver == BIP32_VER_MAIN_PRIVATE || ver == BIP32_VER_TEST_PRIVATE) |
|
||||
return true; |
|
||||
|
|
||||
return flags == BIP32_FLAG_KEY_PUBLIC && |
|
||||
(ver == BIP32_VER_MAIN_PUBLIC || ver == BIP32_VER_TEST_PUBLIC); |
|
||||
} |
|
||||
|
|
||||
static bool version_is_mainnet(uint32_t ver) |
|
||||
{ |
|
||||
return ver == BIP32_VER_MAIN_PRIVATE || ver == BIP32_VER_MAIN_PUBLIC; |
|
||||
} |
|
||||
|
|
||||
static bool key_is_private(const struct ext_key *key_in) |
|
||||
{ |
|
||||
return key_in->priv_key[0] == BIP32_FLAG_KEY_PRIVATE; |
|
||||
} |
|
||||
|
|
||||
static void key_strip_private_key(struct ext_key *key_out) |
|
||||
{ |
|
||||
key_out->priv_key[0] = BIP32_FLAG_KEY_PUBLIC; |
|
||||
clear(key_out->priv_key + 1, sizeof(key_out->priv_key) - 1); |
|
||||
} |
|
||||
|
|
||||
/* Compute a public key from a private key */ |
|
||||
static int key_compute_pub_key(struct ext_key *key_out) |
|
||||
{ |
|
||||
return wally_ec_public_key_from_private_key(key_out->priv_key + 1, |
|
||||
EC_PRIVATE_KEY_LEN, |
|
||||
key_out->pub_key, |
|
||||
sizeof(key_out->pub_key)); |
|
||||
} |
|
||||
|
|
||||
static void key_compute_hash160(struct ext_key *key_out) |
|
||||
{ |
|
||||
wally_hash160(key_out->pub_key, sizeof(key_out->pub_key), |
|
||||
key_out->hash160, sizeof(key_out->hash160)); |
|
||||
} |
|
||||
|
|
||||
int bip32_key_free(const struct ext_key *key_in) |
|
||||
{ |
|
||||
if (!key_in) |
|
||||
return WALLY_EINVAL; |
|
||||
wally_free((void *)key_in); |
|
||||
return WALLY_OK; |
|
||||
} |
|
||||
|
|
||||
static bool is_valid_seed_len(size_t len) { |
|
||||
return len == BIP32_ENTROPY_LEN_512 || len == BIP32_ENTROPY_LEN_256 || |
|
||||
len == BIP32_ENTROPY_LEN_128; |
|
||||
} |
|
||||
|
|
||||
int bip32_key_from_seed(const unsigned char *bytes_in, size_t len_in, |
|
||||
uint32_t version, uint32_t flags, |
|
||||
struct ext_key *key_out) |
|
||||
{ |
|
||||
const secp256k1_context *ctx; |
|
||||
struct sha512 sha; |
|
||||
|
|
||||
if (!bytes_in || !is_valid_seed_len(len_in) || |
|
||||
!version_is_valid(version, BIP32_FLAG_KEY_PRIVATE) || |
|
||||
(flags & ~BIP32_FLAG_SKIP_HASH) || !key_out) |
|
||||
return WALLY_EINVAL; |
|
||||
|
|
||||
clear(key_out, sizeof(*key_out)); |
|
||||
key_out->version = version; |
|
||||
|
|
||||
if (!(ctx = secp_ctx())) |
|
||||
return WALLY_ENOMEM; |
|
||||
|
|
||||
/* Generate private key and chain code */ |
|
||||
hmac_sha512(&sha, SEED, sizeof(SEED), bytes_in, len_in); |
|
||||
|
|
||||
/* Check that the generated private key is valid */ |
|
||||
if (!secp256k1_ec_seckey_verify(ctx, sha.u.u8)) { |
|
||||
clear(&sha, sizeof(sha)); |
|
||||
return WALLY_ERROR; /* Invalid private key */ |
|
||||
} |
|
||||
|
|
||||
/* Copy the private key and set its prefix */ |
|
||||
key_out->priv_key[0] = BIP32_FLAG_KEY_PRIVATE; |
|
||||
memcpy(key_out->priv_key + 1, sha.u.u8, sizeof(sha) / 2); |
|
||||
if (key_compute_pub_key(key_out) != WALLY_OK) { |
|
||||
clear_n(2, &sha, sizeof(sha), key_out, sizeof(*key_out)); |
|
||||
return WALLY_EINVAL; |
|
||||
} |
|
||||
|
|
||||
/* Copy the chain code */ |
|
||||
memcpy(key_out->chain_code, sha.u.u8 + sizeof(sha) / 2, sizeof(sha) / 2); |
|
||||
|
|
||||
key_out->depth = 0; /* Master key, depth 0 */ |
|
||||
key_out->child_num = 0; |
|
||||
if (!(flags & BIP32_FLAG_SKIP_HASH)) |
|
||||
key_compute_hash160(key_out); |
|
||||
clear(&sha, sizeof(sha)); |
|
||||
return WALLY_OK; |
|
||||
} |
|
||||
|
|
||||
#define ALLOC_KEY() \ |
|
||||
if (!output) \ |
|
||||
return WALLY_EINVAL; \ |
|
||||
*output = wally_malloc(sizeof(struct ext_key)); \ |
|
||||
if (!*output) \ |
|
||||
return WALLY_ENOMEM; \ |
|
||||
clear((void *)*output, sizeof(struct ext_key)) |
|
||||
|
|
||||
int bip32_key_from_seed_alloc(const unsigned char *bytes_in, size_t len_in, |
|
||||
uint32_t version, uint32_t flags, |
|
||||
const struct ext_key **output) |
|
||||
{ |
|
||||
int ret; |
|
||||
|
|
||||
ALLOC_KEY(); |
|
||||
ret = bip32_key_from_seed(bytes_in, len_in, version, flags, |
|
||||
(struct ext_key *)*output); |
|
||||
if (ret != WALLY_OK) { |
|
||||
wally_free((void *)*output); |
|
||||
*output = NULL; |
|
||||
} |
|
||||
return ret; |
|
||||
} |
|
||||
|
|
||||
static unsigned char *copy_out(unsigned char *dest, |
|
||||
const void *src, size_t len) |
|
||||
{ |
|
||||
memcpy(dest, src, len); |
|
||||
return dest + len; |
|
||||
} |
|
||||
|
|
||||
static bool key_is_valid(const struct ext_key *key_in) |
|
||||
{ |
|
||||
bool is_private = key_is_private(key_in); |
|
||||
bool is_master = !key_in->depth; |
|
||||
uint8_t ver_flags = is_private ? BIP32_FLAG_KEY_PRIVATE : BIP32_FLAG_KEY_PUBLIC; |
|
||||
|
|
||||
if (!version_is_valid(key_in->version, ver_flags)) |
|
||||
return false; |
|
||||
|
|
||||
if (mem_is_zero(key_in->chain_code, sizeof(key_in->chain_code)) || |
|
||||
(key_in->pub_key[0] != 0x2 && key_in->pub_key[0] != 0x3) || |
|
||||
mem_is_zero(key_in->pub_key + 1, sizeof(key_in->pub_key) - 1)) |
|
||||
return false; |
|
||||
|
|
||||
if (key_in->priv_key[0] != BIP32_FLAG_KEY_PUBLIC && |
|
||||
key_in->priv_key[0] != BIP32_FLAG_KEY_PRIVATE) |
|
||||
return false; |
|
||||
|
|
||||
if (is_private && |
|
||||
mem_is_zero(key_in->priv_key + 1, sizeof(key_in->priv_key) - 1)) |
|
||||
return false; |
|
||||
|
|
||||
if (is_master && !is_private) |
|
||||
return false; |
|
||||
|
|
||||
if (is_master && |
|
||||
!mem_is_zero(key_in->parent160, sizeof(key_in->parent160))) |
|
||||
return false; |
|
||||
|
|
||||
return true; |
|
||||
} |
|
||||
|
|
||||
int bip32_key_serialize(const struct ext_key *key_in, uint32_t flags, |
|
||||
unsigned char *bytes_out, size_t len) |
|
||||
{ |
|
||||
const bool serialize_private = !(flags & BIP32_FLAG_KEY_PUBLIC); |
|
||||
unsigned char *out = bytes_out; |
|
||||
uint32_t tmp32; |
|
||||
beint32_t tmp32_be; |
|
||||
|
|
||||
if (flags & ~BIP32_FLAG_KEY_PUBLIC) |
|
||||
return WALLY_EINVAL; /* Only this flag makes sense here */ |
|
||||
|
|
||||
/* Validate our arguments and then the input key */ |
|
||||
if (!key_in || |
|
||||
(serialize_private && !key_is_private(key_in)) || |
|
||||
!key_is_valid(key_in) || |
|
||||
!bytes_out || len != BIP32_SERIALIZED_LEN) |
|
||||
return WALLY_EINVAL; |
|
||||
|
|
||||
tmp32 = key_in->version; |
|
||||
if (!serialize_private) { |
|
||||
/* Change version if serialising the public part of a private key */ |
|
||||
if (tmp32 == BIP32_VER_MAIN_PRIVATE) |
|
||||
tmp32 = BIP32_VER_MAIN_PUBLIC; |
|
||||
else if (tmp32 == BIP32_VER_TEST_PRIVATE) |
|
||||
tmp32 = BIP32_VER_TEST_PUBLIC; |
|
||||
} |
|
||||
tmp32_be = cpu_to_be32(tmp32); |
|
||||
out = copy_out(out, &tmp32_be, sizeof(tmp32_be)); |
|
||||
|
|
||||
*out++ = key_in->depth; |
|
||||
|
|
||||
/* Save the first 32 bits of the parent key (aka fingerprint) only */ |
|
||||
out = copy_out(out, key_in->parent160, sizeof(uint32_t)); |
|
||||
|
|
||||
tmp32_be = cpu_to_be32(key_in->child_num); |
|
||||
out = copy_out(out, &tmp32_be, sizeof(tmp32_be)); |
|
||||
|
|
||||
out = copy_out(out, key_in->chain_code, sizeof(key_in->chain_code)); |
|
||||
|
|
||||
if (serialize_private) |
|
||||
copy_out(out, key_in->priv_key, sizeof(key_in->priv_key)); |
|
||||
else |
|
||||
copy_out(out, key_in->pub_key, sizeof(key_in->pub_key)); |
|
||||
|
|
||||
return WALLY_OK; |
|
||||
} |
|
||||
|
|
||||
static const unsigned char *copy_in(void *dest, |
|
||||
const unsigned char *src, size_t len) |
|
||||
{ |
|
||||
memcpy(dest, src, len); |
|
||||
return src + len; |
|
||||
} |
|
||||
|
|
||||
/* Wipe a key and return failure for the caller to propigate */ |
|
||||
static int wipe_key_fail(struct ext_key *key_out) |
|
||||
{ |
|
||||
clear(key_out, sizeof(*key_out)); |
|
||||
return WALLY_EINVAL; |
|
||||
} |
|
||||
|
|
||||
int bip32_key_unserialize(const unsigned char *bytes_in, size_t len_in, |
|
||||
struct ext_key *key_out) |
|
||||
{ |
|
||||
if (!bytes_in || len_in != BIP32_SERIALIZED_LEN || !key_out) |
|
||||
return WALLY_EINVAL; |
|
||||
|
|
||||
clear(key_out, sizeof(*key_out)); |
|
||||
|
|
||||
bytes_in = copy_in(&key_out->version, bytes_in, sizeof(key_out->version)); |
|
||||
key_out->version = be32_to_cpu(key_out->version); |
|
||||
if (!version_is_valid(key_out->version, BIP32_FLAG_KEY_PUBLIC)) |
|
||||
return wipe_key_fail(key_out); |
|
||||
|
|
||||
bytes_in = copy_in(&key_out->depth, bytes_in, sizeof(key_out->depth)); |
|
||||
|
|
||||
/* We only have a partial fingerprint available. Copy it, but the
|
|
||||
* user will need to call bip32_key_set_parent() (FIXME: Implement) |
|
||||
* later if they want it to be fully populated. |
|
||||
*/ |
|
||||
bytes_in = copy_in(key_out->parent160, bytes_in, sizeof(uint32_t)); |
|
||||
bytes_in = copy_in(&key_out->child_num, bytes_in, sizeof(key_out->child_num)); |
|
||||
key_out->child_num = be32_to_cpu(key_out->child_num); |
|
||||
bytes_in = copy_in(key_out->chain_code, bytes_in, sizeof(key_out->chain_code)); |
|
||||
|
|
||||
if (bytes_in[0] == BIP32_FLAG_KEY_PRIVATE) { |
|
||||
if (key_out->version == BIP32_VER_MAIN_PUBLIC || |
|
||||
key_out->version == BIP32_VER_TEST_PUBLIC) |
|
||||
return wipe_key_fail(key_out); /* Private key data in public key */ |
|
||||
|
|
||||
copy_in(key_out->priv_key, bytes_in, sizeof(key_out->priv_key)); |
|
||||
if (key_compute_pub_key(key_out) != WALLY_OK) |
|
||||
return wipe_key_fail(key_out); |
|
||||
} else { |
|
||||
if (key_out->version == BIP32_VER_MAIN_PRIVATE || |
|
||||
key_out->version == BIP32_VER_TEST_PRIVATE) |
|
||||
return wipe_key_fail(key_out); /* Public key data in private key */ |
|
||||
|
|
||||
copy_in(key_out->pub_key, bytes_in, sizeof(key_out->pub_key)); |
|
||||
key_strip_private_key(key_out); |
|
||||
} |
|
||||
|
|
||||
key_compute_hash160(key_out); |
|
||||
return WALLY_OK; |
|
||||
} |
|
||||
|
|
||||
int bip32_key_unserialize_alloc(const unsigned char *bytes_in, size_t len_in, |
|
||||
const struct ext_key **output) |
|
||||
{ |
|
||||
int ret; |
|
||||
|
|
||||
ALLOC_KEY(); |
|
||||
ret = bip32_key_unserialize(bytes_in, len_in, (struct ext_key *)*output); |
|
||||
if (ret) { |
|
||||
wally_free((void *)*output); |
|
||||
*output = 0; |
|
||||
} |
|
||||
return ret; |
|
||||
} |
|
||||
|
|
||||
/* BIP32: Child Key Derivations
|
|
||||
* |
|
||||
* The spec doesn't have a simple table of derivations, its: |
|
||||
* |
|
||||
* Parent Child Hardened Status Path In Spec |
|
||||
* private private no OK m/n Y |
|
||||
* private private yes OK m/nH Y |
|
||||
* private public no OK - N |
|
||||
* private public yes OK - N |
|
||||
* public private no FAIL (N/A) (N/A) |
|
||||
* public private yes FAIL (N/A) (N/A) |
|
||||
* public public no OK M/n N |
|
||||
* public public yes FAIL M/nH (N/A) |
|
||||
* |
|
||||
* The spec path nomenclature only expresses derivations where the parent |
|
||||
* and desired child type match. For private->public the derivation is |
|
||||
* described in terms of private-private and public->public, but there are |
|
||||
* no test vectors or paths describing these values to validate against. |
|
||||
* Further, there are no public-public vectors in the BIP32 spec either. |
|
||||
*/ |
|
||||
int bip32_key_from_parent(const struct ext_key *key_in, uint32_t child_num, |
|
||||
uint32_t flags, struct ext_key *key_out) |
|
||||
{ |
|
||||
struct sha512 sha; |
|
||||
const secp256k1_context *ctx; |
|
||||
const bool we_are_private = key_in && key_is_private(key_in); |
|
||||
const bool derive_private = !(flags & BIP32_FLAG_KEY_PUBLIC); |
|
||||
const bool hardened = child_is_hardened(child_num); |
|
||||
|
|
||||
if (flags & ~BIP32_ALL_DEFINED_FLAGS) |
|
||||
return WALLY_EINVAL; /* These flags are not defined yet */ |
|
||||
|
|
||||
if (!key_in || !key_out) |
|
||||
return WALLY_EINVAL; |
|
||||
|
|
||||
if (!(ctx = secp_ctx())) |
|
||||
return WALLY_ENOMEM; |
|
||||
|
|
||||
if (!we_are_private && (derive_private || hardened)) |
|
||||
return wipe_key_fail(key_out); /* Unsupported derivation */ |
|
||||
|
|
||||
if (key_in->depth == 0xff) |
|
||||
return wipe_key_fail(key_out); /* Maximum depth reached */ |
|
||||
|
|
||||
/*
|
|
||||
* Private parent -> private child: |
|
||||
* CKDpriv((kpar, cpar), i) -> (ki, ci) |
|
||||
* |
|
||||
* Private parent -> public child: |
|
||||
* N(CKDpriv((kpar, cpar), i) -> (ki, ci)) |
|
||||
* As we always calculate the public key, we can derive a public |
|
||||
* child by deriving a private one and stripping its private key. |
|
||||
* |
|
||||
* Public parent -> non hardened public child |
|
||||
* CKDpub((Kpar, cpar), i) -> (Ki, ci) |
|
||||
*/ |
|
||||
|
|
||||
/* NB: We use the key_outs' priv_key+child_num to hold 'Data' here */ |
|
||||
if (hardened) { |
|
||||
/* Hardened: Data = 0x00 || ser256(kpar) || ser32(i)) */ |
|
||||
memcpy(key_out->priv_key, key_in->priv_key, sizeof(key_in->priv_key)); |
|
||||
} else { |
|
||||
/* Non Hardened Private: Data = serP(point(kpar)) || ser32(i)
|
|
||||
* Non Hardened Public : Data = serP(kpar) || ser32(i) |
|
||||
* point(kpar) when par is private is the public key. |
|
||||
*/ |
|
||||
memcpy(key_out->priv_key, key_in->pub_key, sizeof(key_in->pub_key)); |
|
||||
} |
|
||||
|
|
||||
/* This is the '|| ser32(i)' part of the above */ |
|
||||
key_out->child_num = cpu_to_be32(child_num); |
|
||||
|
|
||||
/* I = HMAC-SHA512(Key = cpar, Data) */ |
|
||||
hmac_sha512(&sha, key_in->chain_code, sizeof(key_in->chain_code), |
|
||||
key_out->priv_key, |
|
||||
sizeof(key_out->priv_key) + sizeof(key_out->child_num)); |
|
||||
|
|
||||
/* Split I into two 32-byte sequences, IL and IR
|
|
||||
* The returned chain code ci is IR (i.e. the 2nd half of our hmac sha512) |
|
||||
*/ |
|
||||
memcpy(key_out->chain_code, sha.u.u8 + sizeof(sha) / 2, |
|
||||
sizeof(key_out->chain_code)); |
|
||||
|
|
||||
if (we_are_private) { |
|
||||
/* The returned child key ki is parse256(IL) + kpar (mod n)
|
|
||||
* In case parse256(IL) ≥ n or ki = 0, the resulting key is invalid |
|
||||
* (NOTE: privkey_tweak_add checks both conditions) |
|
||||
*/ |
|
||||
memcpy(key_out->priv_key, key_in->priv_key, sizeof(key_in->priv_key)); |
|
||||
if (!privkey_tweak_add(ctx, key_out->priv_key + 1, sha.u.u8)) { |
|
||||
clear(&sha, sizeof(sha)); |
|
||||
return wipe_key_fail(key_out); /* Out of bounds FIXME: Iterate to the next? */ |
|
||||
} |
|
||||
|
|
||||
if (key_compute_pub_key(key_out) != WALLY_OK) { |
|
||||
clear(&sha, sizeof(sha)); |
|
||||
return wipe_key_fail(key_out); |
|
||||
} |
|
||||
} else { |
|
||||
/* The returned child key ki is point(parse256(IL) + kpar)
|
|
||||
* In case parse256(IL) ≥ n or Ki is the point at infinity, the |
|
||||
* resulting key is invalid (NOTE: pubkey_tweak_add checks both |
|
||||
* conditions) |
|
||||
*/ |
|
||||
secp256k1_pubkey pub_key; |
|
||||
size_t len = sizeof(key_out->pub_key); |
|
||||
|
|
||||
/* FIXME: Out of bounds on pubkey_tweak_add */ |
|
||||
if (!pubkey_parse(ctx, &pub_key, key_in->pub_key, |
|
||||
sizeof(key_in->pub_key)) || |
|
||||
!pubkey_tweak_add(ctx, &pub_key, sha.u.u8) || |
|
||||
!pubkey_serialize(ctx, key_out->pub_key, &len, &pub_key, |
|
||||
PUBKEY_COMPRESSED) || |
|
||||
len != sizeof(key_out->pub_key)) { |
|
||||
clear(&sha, sizeof(sha)); |
|
||||
return wipe_key_fail(key_out); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
if (derive_private) { |
|
||||
if (version_is_mainnet(key_in->version)) |
|
||||
key_out->version = BIP32_VER_MAIN_PRIVATE; |
|
||||
else |
|
||||
key_out->version = BIP32_VER_TEST_PRIVATE; |
|
||||
|
|
||||
} else { |
|
||||
if (version_is_mainnet(key_in->version)) |
|
||||
key_out->version = BIP32_VER_MAIN_PUBLIC; |
|
||||
else |
|
||||
key_out->version = BIP32_VER_TEST_PUBLIC; |
|
||||
|
|
||||
key_strip_private_key(key_out); |
|
||||
} |
|
||||
|
|
||||
key_out->depth = key_in->depth + 1; |
|
||||
key_out->child_num = child_num; |
|
||||
if (flags & BIP32_FLAG_SKIP_HASH) |
|
||||
clear_n(2, &key_out->parent160, sizeof(key_out->parent160), |
|
||||
&key_out->hash160, sizeof(key_out->hash160)); |
|
||||
else { |
|
||||
memcpy(key_out->parent160, key_in->hash160, sizeof(key_in->hash160)); |
|
||||
key_compute_hash160(key_out); |
|
||||
} |
|
||||
clear(&sha, sizeof(sha)); |
|
||||
return WALLY_OK; |
|
||||
} |
|
||||
|
|
||||
int bip32_key_from_parent_alloc(const struct ext_key *key_in, |
|
||||
uint32_t child_num, uint32_t flags, |
|
||||
const struct ext_key **output) |
|
||||
{ |
|
||||
int ret; |
|
||||
|
|
||||
ALLOC_KEY(); |
|
||||
ret = bip32_key_from_parent(key_in, child_num, flags, (struct ext_key *)*output); |
|
||||
if (ret) { |
|
||||
wally_free((void *)*output); |
|
||||
*output = 0; |
|
||||
} |
|
||||
return ret; |
|
||||
} |
|
||||
|
|
||||
int bip32_key_from_parent_path(const struct ext_key *key_in, |
|
||||
const uint32_t *child_num_in, size_t child_num_len, |
|
||||
uint32_t flags, struct ext_key *key_out) |
|
||||
{ |
|
||||
/* Optimization: We can skip hash calculations for internal nodes */ |
|
||||
uint32_t derivation_flags = flags | BIP32_FLAG_SKIP_HASH; |
|
||||
struct ext_key tmp[2]; |
|
||||
size_t i, tmp_idx = 0; |
|
||||
int ret; |
|
||||
|
|
||||
if (flags & ~BIP32_ALL_DEFINED_FLAGS) |
|
||||
return WALLY_EINVAL; /* These flags are not defined yet */ |
|
||||
|
|
||||
if (!key_in || !child_num_in || !child_num_len || !key_out) |
|
||||
return WALLY_EINVAL; |
|
||||
|
|
||||
for (i = 0; i < child_num_len; ++i) { |
|
||||
struct ext_key *derived = &tmp[tmp_idx]; |
|
||||
if (i + 2 >= child_num_len) |
|
||||
derivation_flags = flags; /* Use callers flags for the final derivations */ |
|
||||
ret = bip32_key_from_parent(key_in, child_num_in[i], derivation_flags, derived); |
|
||||
if (ret != WALLY_OK) |
|
||||
break; |
|
||||
key_in = derived; /* Derived becomes next parent */ |
|
||||
tmp_idx = !tmp_idx; /* Use free slot in tmp for next derived */ |
|
||||
} |
|
||||
|
|
||||
if (ret == WALLY_OK) |
|
||||
memcpy(key_out, key_in, sizeof(*key_out)); |
|
||||
|
|
||||
clear(tmp, sizeof(tmp)); |
|
||||
return ret; |
|
||||
} |
|
||||
|
|
||||
int bip32_key_from_parent_path_alloc(const struct ext_key *key_in, |
|
||||
const uint32_t *child_num_in, size_t child_num_len, |
|
||||
uint32_t flags, |
|
||||
const struct ext_key **output) |
|
||||
{ |
|
||||
int ret; |
|
||||
|
|
||||
ALLOC_KEY(); |
|
||||
ret = bip32_key_from_parent_path(key_in, child_num_in, child_num_len, |
|
||||
flags, (struct ext_key *)*output); |
|
||||
if (ret) { |
|
||||
wally_free((void *)*output); |
|
||||
*output = 0; |
|
||||
} |
|
||||
return ret; |
|
||||
} |
|
||||
|
|
||||
int bip32_key_init_alloc(uint32_t version, uint32_t depth, uint32_t child_num, |
|
||||
const unsigned char *chain_code, size_t chain_code_len, |
|
||||
const unsigned char *pub_key, size_t pub_key_len, |
|
||||
const unsigned char *priv_key, size_t priv_key_len, |
|
||||
const unsigned char *hash160, size_t hash160_len, |
|
||||
const unsigned char *parent160, size_t parent160_len, |
|
||||
const struct ext_key **output) |
|
||||
{ |
|
||||
struct ext_key *key_out; |
|
||||
|
|
||||
if (!output) |
|
||||
return WALLY_EINVAL; |
|
||||
*output = NULL; |
|
||||
|
|
||||
switch (version) { |
|
||||
case BIP32_VER_MAIN_PRIVATE: |
|
||||
case BIP32_VER_TEST_PRIVATE: |
|
||||
if (!priv_key || priv_key_len != key_size(priv_key) - 1) |
|
||||
return WALLY_EINVAL; |
|
||||
break; |
|
||||
case BIP32_VER_MAIN_PUBLIC: |
|
||||
case BIP32_VER_TEST_PUBLIC: |
|
||||
if (!pub_key || pub_key_len != key_size(pub_key)) |
|
||||
return WALLY_EINVAL; |
|
||||
break; |
|
||||
} |
|
||||
|
|
||||
if (!chain_code || chain_code_len != key_size(chain_code)) |
|
||||
return WALLY_EINVAL; |
|
||||
|
|
||||
if ((priv_key && priv_key_len != key_size(priv_key) - 1) || (!priv_key && priv_key_len) || |
|
||||
(pub_key && pub_key_len != key_size(pub_key)) || (!pub_key && pub_key_len) || |
|
||||
(hash160 && hash160_len != key_size(hash160)) || (!hash160 && hash160_len) || |
|
||||
(parent160 && parent160_len != key_size(parent160))) |
|
||||
return WALLY_EINVAL; |
|
||||
|
|
||||
ALLOC_KEY(); |
|
||||
|
|
||||
key_out = (struct ext_key *)*output; |
|
||||
key_out->version = version; |
|
||||
key_out->depth = depth; |
|
||||
key_out->child_num = child_num; |
|
||||
|
|
||||
if (chain_code) |
|
||||
memcpy(key_out->chain_code, chain_code, key_size(chain_code)); |
|
||||
if (priv_key && version != BIP32_VER_MAIN_PUBLIC && version != BIP32_VER_TEST_PUBLIC) |
|
||||
memcpy(key_out->priv_key + 1, priv_key, key_size(priv_key) - 1); |
|
||||
else |
|
||||
key_out->priv_key[0] = BIP32_FLAG_KEY_PUBLIC; |
|
||||
if (pub_key) |
|
||||
memcpy(key_out->pub_key, pub_key, key_size(pub_key)); |
|
||||
else if (version == BIP32_VER_MAIN_PRIVATE || version == BIP32_VER_TEST_PRIVATE) { |
|
||||
/* Compute the public key if not given */ |
|
||||
int ret = key_compute_pub_key(key_out); |
|
||||
if (ret != WALLY_OK) { |
|
||||
clear(key_out, sizeof(*key_out)); |
|
||||
wally_free(key_out); |
|
||||
*output = 0; |
|
||||
return ret; |
|
||||
} |
|
||||
} |
|
||||
if (hash160) |
|
||||
memcpy(key_out->hash160, hash160, key_size(hash160)); |
|
||||
else |
|
||||
key_compute_hash160(key_out); |
|
||||
if (parent160) |
|
||||
memcpy(key_out->parent160, parent160, key_size(parent160)); |
|
||||
|
|
||||
return WALLY_OK; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
#if defined (SWIG_JAVA_BUILD) || defined (SWIG_PYTHON_BUILD) |
|
||||
|
|
||||
/* Getters for ext_key values */ |
|
||||
|
|
||||
static int getb_impl(const struct ext_key *key_in, |
|
||||
const unsigned char *src, size_t src_len, |
|
||||
unsigned char *bytes_out, size_t len) |
|
||||
{ |
|
||||
if (!key_in || !bytes_out || len != src_len) |
|
||||
return WALLY_EINVAL; |
|
||||
memcpy(bytes_out, src, len); |
|
||||
return WALLY_OK; |
|
||||
} |
|
||||
|
|
||||
#define GET_B(name) \ |
|
||||
int bip32_key_get_ ## name(const struct ext_key *key_in, unsigned char *bytes_out, size_t len) { \ |
|
||||
return getb_impl(key_in, key_in->name, sizeof(key_in->name), bytes_out, len); \ |
|
||||
} |
|
||||
|
|
||||
GET_B(chain_code) |
|
||||
GET_B(parent160) |
|
||||
GET_B(hash160) |
|
||||
GET_B(pub_key) |
|
||||
|
|
||||
int bip32_key_get_priv_key(const struct ext_key *key_in, unsigned char *bytes_out, size_t len) { |
|
||||
return getb_impl(key_in, key_in->priv_key + 1, sizeof(key_in->priv_key) - 1, bytes_out, len); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
#define GET_I(name) \ |
|
||||
int bip32_key_get_ ## name(const struct ext_key *key_in, size_t *output) { \ |
|
||||
if (output) *output = 0; \ |
|
||||
if (!key_in || !output) return WALLY_EINVAL; \ |
|
||||
*output = key_in->name; \ |
|
||||
return WALLY_OK; \ |
|
||||
} |
|
||||
|
|
||||
GET_I(depth) |
|
||||
GET_I(child_num) |
|
||||
GET_I(version) |
|
||||
|
|
||||
#endif /* SWIG_JAVA_BUILD/SWIG_PYTHON_BUILD */ |
|
@ -1,18 +0,0 @@ |
|||||
#ifndef LIBWALLY_CORE_BIP32_INT_H |
|
||||
#define LIBWALLY_CORE_BIP32_INT_H 1 |
|
||||
|
|
||||
#if defined(SWIG) || defined (SWIG_JAVA_BUILD) || defined (SWIG_PYTHON_BUILD) |
|
||||
|
|
||||
WALLY_CORE_API int bip32_key_get_chain_code(const struct ext_key *key_in, unsigned char *bytes_out, size_t len); |
|
||||
WALLY_CORE_API int bip32_key_get_parent160(const struct ext_key *key_in, unsigned char *bytes_out, size_t len); |
|
||||
WALLY_CORE_API int bip32_key_get_priv_key(const struct ext_key *key_in, unsigned char *bytes_out, size_t len); |
|
||||
WALLY_CORE_API int bip32_key_get_hash160(const struct ext_key *key_in, unsigned char *bytes_out, size_t len); |
|
||||
WALLY_CORE_API int bip32_key_get_pub_key(const struct ext_key *key_in, unsigned char *bytes_out, size_t len); |
|
||||
|
|
||||
WALLY_CORE_API int bip32_key_get_depth(const struct ext_key *key_in, size_t *output); |
|
||||
WALLY_CORE_API int bip32_key_get_child_num(const struct ext_key *key_in, size_t *output); |
|
||||
WALLY_CORE_API int bip32_key_get_version(const struct ext_key *key_in, size_t *output); |
|
||||
|
|
||||
#endif /* SWIG_JAVA_BUILD/SWIG_JAVA_BUILD/SWIG_PYTHON_BUILD */ |
|
||||
|
|
||||
#endif /* LIBWALLY_CORE_BIP32_INT_H */ |
|
@ -1,317 +0,0 @@ |
|||||
#include "internal.h" |
|
||||
#include "base58.h" |
|
||||
#include "ccan/ccan/crypto/sha256/sha256.h" |
|
||||
#include "ccan/ccan/crypto/ripemd160/ripemd160.h" |
|
||||
#include "ccan/ccan/endian/endian.h" |
|
||||
#include "ccan/ccan/build_assert/build_assert.h" |
|
||||
#include <include/wally_bip38.h> |
|
||||
#include <include/wally_crypto.h> |
|
||||
#include <stdbool.h> |
|
||||
|
|
||||
#define BIP38_FLAG_DEFAULT (0x40 | 0x80) |
|
||||
#define BIP38_FLAG_COMPRESSED 0x20 |
|
||||
#define BIP38_FLAG_RESERVED1 0x10 |
|
||||
#define BIP38_FLAG_RESERVED2 0x08 |
|
||||
#define BIP38_FLAG_HAVE_LOT 0x04 |
|
||||
#define BIP38_FLAG_RESERVED3 0x02 |
|
||||
#define BIP38_FLAG_RESERVED4 0x01 |
|
||||
#define BIP38_FLAGS_RESERVED (BIP38_FLAG_RESERVED1 | BIP38_FLAG_RESERVED2 | \ |
|
||||
BIP38_FLAG_RESERVED3 | BIP38_FLAG_RESERVED4) |
|
||||
|
|
||||
#define BIP38_ALL_DEFINED_FLAGS (BIP38_KEY_MAINNET | \ |
|
||||
BIP38_KEY_TESTNET | \ |
|
||||
BIP38_KEY_COMPRESSED | \ |
|
||||
BIP38_KEY_EC_MULT | \ |
|
||||
BIP38_KEY_QUICK_CHECK | \ |
|
||||
BIP38_KEY_RAW_MODE | \ |
|
||||
BIP38_KEY_SWAP_ORDER | \ |
|
||||
BIP38_FLAG_DEFAULT | \ |
|
||||
BIP38_FLAG_COMPRESSED | \ |
|
||||
BIP38_FLAG_HAVE_LOT) |
|
||||
|
|
||||
#define BIP38_DERVIED_KEY_LEN 64u |
|
||||
|
|
||||
#define BIP38_PREFIX 0x01 |
|
||||
#define BIP38_ECMUL 0x43 |
|
||||
#define BIP38_NO_ECMUL 0x42 |
|
||||
|
|
||||
struct derived_t { |
|
||||
unsigned char half1_lo[BIP38_DERVIED_KEY_LEN / 4]; |
|
||||
unsigned char half1_hi[BIP38_DERVIED_KEY_LEN / 4]; |
|
||||
unsigned char half2[BIP38_DERVIED_KEY_LEN / 2]; |
|
||||
}; |
|
||||
|
|
||||
struct bip38_layout_t { |
|
||||
unsigned char pad1; |
|
||||
unsigned char prefix; |
|
||||
unsigned char ec_type; |
|
||||
unsigned char flags; |
|
||||
uint32_t hash; |
|
||||
unsigned char half1[AES_BLOCK_LEN]; |
|
||||
unsigned char half2[AES_BLOCK_LEN]; |
|
||||
unsigned char decode_hash[BASE58_CHECKSUM_LEN]; |
|
||||
}; |
|
||||
|
|
||||
/* LCOV_EXCL_START */ |
|
||||
/* Check assumptions we expect to hold true */ |
|
||||
static void assert_assumptions(void) |
|
||||
{ |
|
||||
/* derived_t/bip38_layout_t must be contiguous */ |
|
||||
BUILD_ASSERT(sizeof(struct derived_t) == BIP38_DERVIED_KEY_LEN); |
|
||||
/* 44 -> pad1 + 39 + BASE58_CHECKSUM_LEN */ |
|
||||
BUILD_ASSERT(sizeof(struct bip38_layout_t) == 44u); |
|
||||
BUILD_ASSERT((sizeof(struct bip38_layout_t) - BASE58_CHECKSUM_LEN - 1) == |
|
||||
BIP38_SERIALIZED_LEN); |
|
||||
} |
|
||||
/* LCOV_EXCL_STOP */ |
|
||||
|
|
||||
/* FIXME: Export this with other address functions */ |
|
||||
static int address_from_private_key(const unsigned char *bytes_in, |
|
||||
size_t len_in, |
|
||||
unsigned char network, |
|
||||
bool compressed, |
|
||||
char **output) |
|
||||
{ |
|
||||
struct sha256 sha; |
|
||||
unsigned char pub_key_short[EC_PUBLIC_KEY_LEN]; |
|
||||
unsigned char pub_key_long[EC_PUBLIC_KEY_UNCOMPRESSED_LEN]; |
|
||||
unsigned char *pub_key = pub_key_short; |
|
||||
size_t pub_key_len = compressed ? EC_PUBLIC_KEY_LEN : EC_PUBLIC_KEY_UNCOMPRESSED_LEN; |
|
||||
struct { |
|
||||
union { |
|
||||
uint32_t network; |
|
||||
unsigned char bytes[4]; |
|
||||
} network_bytes; /* Used for alignment */ |
|
||||
struct ripemd160 hash160; |
|
||||
} buf; |
|
||||
int ret; |
|
||||
|
|
||||
/* Network and hash160 must be contiguous */ |
|
||||
BUILD_ASSERT(sizeof(buf) == sizeof(struct ripemd160) + sizeof(uint32_t)); |
|
||||
|
|
||||
ret = wally_ec_public_key_from_private_key(bytes_in, len_in, |
|
||||
pub_key_short, sizeof(pub_key_short)); |
|
||||
if (ret == WALLY_OK && !compressed) { |
|
||||
ret = wally_ec_public_key_decompress(pub_key_short, sizeof(pub_key_short), |
|
||||
pub_key_long, sizeof(pub_key_long)); |
|
||||
pub_key = pub_key_long; |
|
||||
} |
|
||||
if (ret == WALLY_OK) { |
|
||||
sha256(&sha, pub_key, pub_key_len); |
|
||||
ripemd160(&buf.hash160, &sha, sizeof(sha)); |
|
||||
buf.network_bytes.bytes[3] = network; |
|
||||
ret = wally_base58_from_bytes(&buf.network_bytes.bytes[3], |
|
||||
sizeof(unsigned char) + sizeof(buf.hash160), |
|
||||
BASE58_FLAG_CHECKSUM, output); |
|
||||
} |
|
||||
clear_n(4, &sha, sizeof(sha), pub_key_short, sizeof(pub_key_short), |
|
||||
pub_key_long, sizeof(pub_key_long), &buf, sizeof(buf)); |
|
||||
return ret; |
|
||||
} |
|
||||
|
|
||||
static void aes_enc(const unsigned char *src, const unsigned char *xor, |
|
||||
const unsigned char *key, unsigned char *bytes_out) |
|
||||
{ |
|
||||
unsigned char plaintext[AES_BLOCK_LEN]; |
|
||||
size_t i; |
|
||||
|
|
||||
for (i = 0; i < sizeof(plaintext); ++i) |
|
||||
plaintext[i] = src[i] ^ xor[i]; |
|
||||
|
|
||||
wally_aes(key, AES_KEY_LEN_256, plaintext, AES_BLOCK_LEN, |
|
||||
AES_FLAG_ENCRYPT, bytes_out, AES_BLOCK_LEN); |
|
||||
|
|
||||
clear(plaintext, sizeof(plaintext)); |
|
||||
} |
|
||||
|
|
||||
int bip38_raw_from_private_key(const unsigned char *bytes_in, size_t len_in, |
|
||||
const unsigned char *pass, size_t pass_len, |
|
||||
uint32_t flags, |
|
||||
unsigned char *bytes_out, size_t len) |
|
||||
{ |
|
||||
const bool compressed = flags & BIP38_KEY_COMPRESSED; |
|
||||
struct derived_t derived; |
|
||||
struct bip38_layout_t buf; |
|
||||
int ret = WALLY_EINVAL; |
|
||||
|
|
||||
if (!bytes_in || len_in != EC_PRIVATE_KEY_LEN || |
|
||||
!bytes_out || len != BIP38_SERIALIZED_LEN || |
|
||||
flags & ~BIP38_ALL_DEFINED_FLAGS) |
|
||||
goto finish; |
|
||||
|
|
||||
if (flags & BIP38_KEY_RAW_MODE) |
|
||||
buf.hash = base58_get_checksum(bytes_in, len_in); |
|
||||
else { |
|
||||
const unsigned char network = flags & 0xff; |
|
||||
char *addr58 = NULL; |
|
||||
if ((ret = address_from_private_key(bytes_in, len_in, |
|
||||
network, compressed, &addr58))) |
|
||||
goto finish; |
|
||||
|
|
||||
buf.hash = base58_get_checksum((unsigned char *)addr58, strlen(addr58)); |
|
||||
wally_free_string(addr58); |
|
||||
} |
|
||||
|
|
||||
ret = wally_scrypt(pass, pass_len, |
|
||||
(unsigned char *)&buf.hash, sizeof(buf.hash), 16384, 8, 8, |
|
||||
(unsigned char *)&derived, sizeof(derived)); |
|
||||
if (ret) |
|
||||
goto finish; |
|
||||
|
|
||||
buf.prefix = BIP38_PREFIX; |
|
||||
buf.ec_type = BIP38_NO_ECMUL; /* FIXME: EC-Multiply support */ |
|
||||
buf.flags = BIP38_FLAG_DEFAULT | (compressed ? BIP38_FLAG_COMPRESSED : 0); |
|
||||
aes_enc(bytes_in + 0, derived.half1_lo, derived.half2, buf.half1); |
|
||||
aes_enc(bytes_in + 16, derived.half1_hi, derived.half2, buf.half2); |
|
||||
|
|
||||
if (flags & BIP38_KEY_SWAP_ORDER) { |
|
||||
/* Shuffle hash from the beginning to the end */ |
|
||||
uint32_t tmp = buf.hash; |
|
||||
memmove(&buf.hash, buf.half1, AES_BLOCK_LEN * 2); |
|
||||
memcpy(buf.decode_hash - sizeof(uint32_t), &tmp, sizeof(uint32_t)); |
|
||||
} |
|
||||
|
|
||||
memcpy(bytes_out, &buf.prefix, BIP38_SERIALIZED_LEN); |
|
||||
|
|
||||
finish: |
|
||||
clear_n(2, &derived, sizeof(derived), &buf, sizeof(buf)); |
|
||||
return ret; |
|
||||
} |
|
||||
|
|
||||
int bip38_from_private_key(const unsigned char *bytes_in, size_t len_in, |
|
||||
const unsigned char *pass, size_t pass_len, |
|
||||
uint32_t flags, char **output) |
|
||||
{ |
|
||||
struct bip38_layout_t buf; |
|
||||
int ret; |
|
||||
|
|
||||
if (!output) |
|
||||
return WALLY_EINVAL; |
|
||||
|
|
||||
*output = NULL; |
|
||||
|
|
||||
ret = bip38_raw_from_private_key(bytes_in, len_in, pass, pass_len, |
|
||||
flags, &buf.prefix, BIP38_SERIALIZED_LEN); |
|
||||
if (!ret) |
|
||||
ret = wally_base58_from_bytes(&buf.prefix, BIP38_SERIALIZED_LEN, |
|
||||
BASE58_FLAG_CHECKSUM, output); |
|
||||
|
|
||||
clear(&buf, sizeof(buf)); |
|
||||
return ret; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
static void aes_dec(const unsigned char *cyphertext, const unsigned char *xor, |
|
||||
const unsigned char *key, unsigned char *bytes_out) |
|
||||
{ |
|
||||
size_t i; |
|
||||
|
|
||||
wally_aes(key, AES_KEY_LEN_256, |
|
||||
(unsigned char *)cyphertext, AES_BLOCK_LEN, |
|
||||
AES_FLAG_DECRYPT, |
|
||||
bytes_out, AES_BLOCK_LEN); |
|
||||
|
|
||||
for (i = 0; i < AES_BLOCK_LEN; ++i) |
|
||||
bytes_out[i] ^= xor[i]; |
|
||||
} |
|
||||
|
|
||||
static int to_private_key(const char *bip38, |
|
||||
const unsigned char *bytes_in, size_t len_in, |
|
||||
const unsigned char *pass, size_t pass_len, |
|
||||
uint32_t flags, |
|
||||
unsigned char *bytes_out, size_t len) |
|
||||
{ |
|
||||
struct derived_t derived; |
|
||||
struct bip38_layout_t buf; |
|
||||
int ret = WALLY_EINVAL; |
|
||||
|
|
||||
if (flags & ~BIP38_ALL_DEFINED_FLAGS) |
|
||||
goto finish; |
|
||||
|
|
||||
if (!(flags & BIP38_KEY_QUICK_CHECK) && |
|
||||
(!bytes_out || len != EC_PRIVATE_KEY_LEN)) |
|
||||
goto finish; |
|
||||
|
|
||||
if (bytes_in) { |
|
||||
if (len_in != BIP38_SERIALIZED_LEN) |
|
||||
goto finish; |
|
||||
memcpy(&buf.prefix, bytes_in, BIP38_SERIALIZED_LEN); |
|
||||
} else { |
|
||||
size_t written; |
|
||||
if ((ret = wally_base58_to_bytes(bip38, BASE58_FLAG_CHECKSUM, &buf.prefix, |
|
||||
BIP38_SERIALIZED_LEN + BASE58_CHECKSUM_LEN, |
|
||||
&written))) |
|
||||
goto finish; |
|
||||
|
|
||||
if (written != BIP38_SERIALIZED_LEN) { |
|
||||
ret = WALLY_EINVAL; |
|
||||
goto finish; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
if (flags & BIP38_KEY_SWAP_ORDER) { |
|
||||
/* Shuffle hash from the end to the beginning */ |
|
||||
uint32_t tmp; |
|
||||
memcpy(&tmp, buf.decode_hash - sizeof(uint32_t), sizeof(uint32_t)); |
|
||||
memmove(buf.half1, &buf.hash, AES_BLOCK_LEN * 2); |
|
||||
buf.hash = tmp; |
|
||||
} |
|
||||
|
|
||||
if (buf.prefix != BIP38_PREFIX || |
|
||||
buf.flags & BIP38_FLAGS_RESERVED || |
|
||||
(buf.flags & BIP38_FLAG_DEFAULT) != BIP38_FLAG_DEFAULT || |
|
||||
buf.ec_type != BIP38_NO_ECMUL /* FIXME: EC Mul support */ || |
|
||||
buf.flags & BIP38_FLAG_HAVE_LOT) { |
|
||||
ret = WALLY_EINVAL; |
|
||||
goto finish; |
|
||||
} |
|
||||
|
|
||||
if (flags & BIP38_KEY_QUICK_CHECK) { |
|
||||
ret = WALLY_OK; |
|
||||
goto finish; |
|
||||
} |
|
||||
|
|
||||
if((ret = wally_scrypt(pass, pass_len, |
|
||||
(unsigned char *)&buf.hash, sizeof(buf.hash), 16384, 8, 8, |
|
||||
(unsigned char *)&derived, sizeof(derived)))) |
|
||||
goto finish; |
|
||||
|
|
||||
aes_dec(buf.half1, derived.half1_lo, derived.half2, bytes_out + 0); |
|
||||
aes_dec(buf.half2, derived.half1_hi, derived.half2, bytes_out + 16); |
|
||||
|
|
||||
if (flags & BIP38_KEY_RAW_MODE) { |
|
||||
if (buf.hash != base58_get_checksum(bytes_out, len)) |
|
||||
ret = WALLY_EINVAL; |
|
||||
} else { |
|
||||
const unsigned char network = flags & 0xff; |
|
||||
char *addr58 = NULL; |
|
||||
ret = address_from_private_key(bytes_out, len, network, |
|
||||
buf.flags & BIP38_FLAG_COMPRESSED, &addr58); |
|
||||
if (!ret && |
|
||||
buf.hash != base58_get_checksum((unsigned char *)addr58, strlen(addr58))) |
|
||||
ret = WALLY_EINVAL; |
|
||||
wally_free_string(addr58); |
|
||||
} |
|
||||
|
|
||||
finish: |
|
||||
clear_n(2, &derived, sizeof(derived), &buf, sizeof(buf)); |
|
||||
return ret; |
|
||||
} |
|
||||
|
|
||||
int bip38_raw_to_private_key(const unsigned char *bytes_in, size_t len_in, |
|
||||
const unsigned char *pass, size_t pass_len, |
|
||||
uint32_t flags, |
|
||||
unsigned char *bytes_out, size_t len) |
|
||||
{ |
|
||||
return to_private_key(NULL, bytes_in, len_in, pass, pass_len, |
|
||||
flags, bytes_out, len); |
|
||||
} |
|
||||
|
|
||||
int bip38_to_private_key(const char *bip38, |
|
||||
const unsigned char *pass, size_t pass_len, |
|
||||
uint32_t flags, |
|
||||
unsigned char *bytes_out, size_t len) |
|
||||
{ |
|
||||
return to_private_key(bip38, NULL, 0, pass, pass_len, flags, |
|
||||
bytes_out, len); |
|
||||
} |
|
@ -1,240 +0,0 @@ |
|||||
#include "internal.h" |
|
||||
#include "mnemonic.h" |
|
||||
#include "wordlist.h" |
|
||||
#include "hmac.h" |
|
||||
#include "ccan/ccan/crypto/sha256/sha256.h" |
|
||||
#include "ccan/ccan/crypto/sha512/sha512.h" |
|
||||
#include <include/wally_bip39.h> |
|
||||
#include <include/wally_crypto.h> |
|
||||
|
|
||||
#include "data/wordlists/chinese_simplified.c" |
|
||||
#include "data/wordlists/chinese_traditional.c" |
|
||||
#include "data/wordlists/english.c" |
|
||||
#include "data/wordlists/french.c" |
|
||||
#include "data/wordlists/italian.c" |
|
||||
#include "data/wordlists/spanish.c" |
|
||||
#include "data/wordlists/japanese.c" |
|
||||
|
|
||||
/* Maximum length including up to 2 bytes for checksum */ |
|
||||
#define BIP39_ENTROPY_LEN_MAX (BIP39_ENTROPY_LEN_320 + sizeof(unsigned char) * 2) |
|
||||
|
|
||||
static const struct { |
|
||||
const char name[4]; |
|
||||
const struct words *words; |
|
||||
} lookup[] = { |
|
||||
{ "en", &en_words}, { "es", &es_words}, { "fr", &fr_words}, |
|
||||
{ "it", &it_words}, { "jp", &jp_words}, { "zhs", &zhs_words}, |
|
||||
{ "zht", &zht_words}, |
|
||||
/* FIXME: Should 'zh' map to traditional or simplified? */ |
|
||||
}; |
|
||||
|
|
||||
int bip39_get_languages(char **output) |
|
||||
{ |
|
||||
if (!output) |
|
||||
return WALLY_EINVAL; |
|
||||
*output = wally_strdup("en es fr it jp zhs zht"); |
|
||||
return *output ? WALLY_OK : WALLY_ENOMEM; |
|
||||
} |
|
||||
|
|
||||
int bip39_get_wordlist(const char *lang, const struct words **output) |
|
||||
{ |
|
||||
size_t i; |
|
||||
|
|
||||
if (!output) |
|
||||
return WALLY_EINVAL; |
|
||||
|
|
||||
*output = &en_words; /* Fallback to English if not found */ |
|
||||
|
|
||||
if (lang) |
|
||||
for (i = 0; i < sizeof(lookup) / sizeof(lookup[0]); ++i) |
|
||||
if (!strcmp(lang, lookup[i].name)) { |
|
||||
*output = lookup[i].words; |
|
||||
break; |
|
||||
} |
|
||||
return WALLY_OK; |
|
||||
} |
|
||||
|
|
||||
int bip39_get_word(const struct words *w, size_t idx, |
|
||||
char **output) |
|
||||
{ |
|
||||
const char *word; |
|
||||
|
|
||||
if (output) |
|
||||
*output = NULL; |
|
||||
|
|
||||
w = w ? w : &en_words; |
|
||||
|
|
||||
if (!output || !(word = wordlist_lookup_index(w, idx))) |
|
||||
return WALLY_EINVAL; |
|
||||
|
|
||||
*output = word ? wally_strdup(word) : NULL; |
|
||||
return *output ? WALLY_OK : WALLY_ENOMEM; |
|
||||
} |
|
||||
|
|
||||
/* Convert an input entropy length to a mask for checksum bits. As it
|
|
||||
* returns 0 for bad lengths, it serves as a validation function too. |
|
||||
*/ |
|
||||
static size_t len_to_mask(size_t len) |
|
||||
{ |
|
||||
switch (len) { |
|
||||
case BIP39_ENTROPY_LEN_128: return 0xf0; |
|
||||
case BIP39_ENTROPY_LEN_160: return 0xf8; |
|
||||
case BIP39_ENTROPY_LEN_192: return 0xfc; |
|
||||
case BIP39_ENTROPY_LEN_224: return 0xfe; |
|
||||
case BIP39_ENTROPY_LEN_256: return 0xff; |
|
||||
case BIP39_ENTROPY_LEN_288: return 0x80ff; |
|
||||
case BIP39_ENTROPY_LEN_320: return 0xC0ff; |
|
||||
} |
|
||||
return 0; |
|
||||
} |
|
||||
|
|
||||
static size_t bip39_checksum(const unsigned char *bytes_in, size_t len_in, size_t mask) |
|
||||
{ |
|
||||
struct sha256 sha; |
|
||||
size_t ret; |
|
||||
sha256(&sha, bytes_in, len_in); |
|
||||
ret = sha.u.u8[0] | (sha.u.u8[1] << 8); |
|
||||
clear(&sha, sizeof(sha)); |
|
||||
return ret & mask; |
|
||||
} |
|
||||
|
|
||||
int bip39_mnemonic_from_bytes(const struct words *w, |
|
||||
const unsigned char *bytes_in, size_t len_in, |
|
||||
char **output) |
|
||||
{ |
|
||||
unsigned char tmp_bytes[BIP39_ENTROPY_LEN_MAX]; |
|
||||
size_t checksum, mask; |
|
||||
|
|
||||
if (output) |
|
||||
*output = NULL; |
|
||||
|
|
||||
if (!bytes_in || !len_in || !output) |
|
||||
return WALLY_EINVAL; |
|
||||
|
|
||||
w = w ? w : &en_words; |
|
||||
|
|
||||
if (w->bits != 11u || !(mask = len_to_mask(len_in))) |
|
||||
return WALLY_EINVAL; |
|
||||
|
|
||||
memcpy(tmp_bytes, bytes_in, len_in); |
|
||||
checksum = bip39_checksum(bytes_in, len_in, mask); |
|
||||
tmp_bytes[len_in] = checksum & 0xff; |
|
||||
if (mask > 0xff) |
|
||||
tmp_bytes[++len_in] = (checksum >> 8) & 0xff; |
|
||||
*output = mnemonic_from_bytes(w, tmp_bytes, len_in + 1); |
|
||||
clear(tmp_bytes, sizeof(tmp_bytes)); |
|
||||
return *output ? WALLY_OK : WALLY_ENOMEM; |
|
||||
} |
|
||||
|
|
||||
static bool checksum_ok(const unsigned char *bytes, size_t idx, size_t mask) |
|
||||
{ |
|
||||
/* The checksum is stored after the data to sum */ |
|
||||
size_t calculated = bip39_checksum(bytes, idx, mask); |
|
||||
size_t stored = bytes[idx]; |
|
||||
if (mask > 0xff) |
|
||||
stored |= (bytes[idx + 1] << 8); |
|
||||
return (stored & mask) == calculated; |
|
||||
} |
|
||||
|
|
||||
int bip39_mnemonic_to_bytes(const struct words *w, const char *mnemonic, |
|
||||
unsigned char *bytes_out, size_t len, |
|
||||
size_t *written) |
|
||||
{ |
|
||||
unsigned char tmp_bytes[BIP39_ENTROPY_LEN_MAX]; |
|
||||
size_t mask, tmp_len; |
|
||||
int ret; |
|
||||
|
|
||||
/* Ideally we would infer the wordlist here. Unfortunately this cannot
|
|
||||
* work reliably because the default word lists overlap. In combination |
|
||||
* with being sorted lexographically, this means the default lists |
|
||||
* were poorly chosen. But we are stuck with them now. |
|
||||
* |
|
||||
* If the caller doesn't know which word list to use, they should iterate |
|
||||
* over the available ones and try any resulting list that the mnemonic |
|
||||
* validates against. |
|
||||
*/ |
|
||||
w = w ? w : &en_words; |
|
||||
|
|
||||
if (written) |
|
||||
*written = 0; |
|
||||
|
|
||||
if (w->bits != 11u || !mnemonic || !bytes_out) |
|
||||
return WALLY_EINVAL; |
|
||||
|
|
||||
ret = mnemonic_to_bytes(w, mnemonic, tmp_bytes, sizeof(tmp_bytes), &tmp_len); |
|
||||
|
|
||||
if (!ret) { |
|
||||
/* Remove checksum bytes from the output length */ |
|
||||
--tmp_len; |
|
||||
if (tmp_len > BIP39_ENTROPY_LEN_256) |
|
||||
--tmp_len; /* Second byte required */ |
|
||||
|
|
||||
if (tmp_len > sizeof(tmp_bytes)) |
|
||||
ret = WALLY_EINVAL; /* Too big for biggest supported entropy */ |
|
||||
else { |
|
||||
if (tmp_len <= len) { |
|
||||
if (!(mask = len_to_mask(tmp_len)) || |
|
||||
!checksum_ok(tmp_bytes, tmp_len, mask)) { |
|
||||
tmp_len = 0; |
|
||||
ret = WALLY_EINVAL; /* Bad checksum */ |
|
||||
} |
|
||||
else |
|
||||
memcpy(bytes_out, tmp_bytes, tmp_len); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
clear(tmp_bytes, sizeof(tmp_bytes)); |
|
||||
if (!ret && written) |
|
||||
*written = tmp_len; |
|
||||
return ret; |
|
||||
} |
|
||||
|
|
||||
int bip39_mnemonic_validate(const struct words *w, const char *mnemonic) |
|
||||
{ |
|
||||
unsigned char buf[BIP39_ENTROPY_LEN_MAX]; |
|
||||
size_t len; |
|
||||
int ret = bip39_mnemonic_to_bytes(w, mnemonic, buf, sizeof(buf), &len); |
|
||||
clear(buf, sizeof(buf)); |
|
||||
return ret; |
|
||||
} |
|
||||
|
|
||||
int bip39_mnemonic_to_seed(const char *mnemonic, const char *password, |
|
||||
unsigned char *bytes_out, size_t len, |
|
||||
size_t *written) |
|
||||
{ |
|
||||
const size_t bip9_cost = 2048u; |
|
||||
const char *prefix = "mnemonic"; |
|
||||
const size_t prefix_len = strlen(prefix); |
|
||||
const size_t password_len = password ? strlen(password) : 0; |
|
||||
const size_t salt_len = prefix_len + password_len + PBKDF2_HMAC_EXTRA_LEN; |
|
||||
unsigned char *salt; |
|
||||
int ret; |
|
||||
|
|
||||
if (written) |
|
||||
*written = 0; |
|
||||
|
|
||||
if (!mnemonic || !bytes_out || len != BIP39_SEED_LEN_512) |
|
||||
return WALLY_EINVAL; |
|
||||
|
|
||||
salt = wally_malloc(salt_len); |
|
||||
if (!salt) |
|
||||
return WALLY_ENOMEM; |
|
||||
|
|
||||
memcpy(salt, prefix, prefix_len); |
|
||||
if (password_len) |
|
||||
memcpy(salt + prefix_len, password, password_len); |
|
||||
|
|
||||
ret = wally_pbkdf2_hmac_sha512((unsigned char *)mnemonic, strlen(mnemonic), |
|
||||
salt, salt_len, |
|
||||
PBKDF2_HMAC_FLAG_BLOCK_RESERVED, |
|
||||
bip9_cost, bytes_out, len); |
|
||||
|
|
||||
if (!ret && written) |
|
||||
*written = BIP39_SEED_LEN_512; /* Succeeded */ |
|
||||
|
|
||||
clear(salt, salt_len); |
|
||||
wally_free(salt); |
|
||||
|
|
||||
return ret; |
|
||||
} |
|
@ -1,8 +0,0 @@ |
|||||
The C Code Archive Network: http://ccodearchive.net |
|
||||
|
|
||||
You can find a set of helper utilities under tools/ and the modules |
|
||||
under ccan/. The recommended way to add ccan modules to your project |
|
||||
is to create a ccan/ directory and add one module per subdirectory |
|
||||
(see tools/create-ccan-tree). |
|
||||
|
|
||||
Enjoy! |
|
@ -1 +0,0 @@ |
|||||
../../licenses/CC0 |
|
@ -1,49 +0,0 @@ |
|||||
#include "config.h" |
|
||||
#include <stdio.h> |
|
||||
#include <string.h> |
|
||||
|
|
||||
/** |
|
||||
* build_assert - routines for build-time assertions |
|
||||
* |
|
||||
* This code provides routines which will cause compilation to fail should some |
|
||||
* assertion be untrue: such failures are preferable to run-time assertions, |
|
||||
* but much more limited since they can only depends on compile-time constants. |
|
||||
* |
|
||||
* These assertions are most useful when two parts of the code must be kept in |
|
||||
* sync: it is better to avoid such cases if possible, but seconds best is to |
|
||||
* detect invalid changes at build time. |
|
||||
* |
|
||||
* For example, a tricky piece of code might rely on a certain element being at |
|
||||
* the start of the structure. To ensure that future changes don't break it, |
|
||||
* you would catch such changes in your code like so: |
|
||||
* |
|
||||
* Example: |
|
||||
* #include <stddef.h> |
|
||||
* #include <ccan/build_assert/build_assert.h> |
|
||||
* |
|
||||
* struct foo { |
|
||||
* char string[5]; |
|
||||
* int x; |
|
||||
* }; |
|
||||
* |
|
||||
* static char *foo_string(struct foo *foo) |
|
||||
* { |
|
||||
* // This trick requires that the string be first in the structure |
|
||||
* BUILD_ASSERT(offsetof(struct foo, string) == 0); |
|
||||
* return (char *)foo; |
|
||||
* } |
|
||||
* |
|
||||
* License: CC0 (Public domain) |
|
||||
* Author: Rusty Russell <rusty@rustcorp.com.au> |
|
||||
*/ |
|
||||
int main(int argc, char *argv[]) |
|
||||
{ |
|
||||
if (argc != 2) |
|
||||
return 1; |
|
||||
|
|
||||
if (strcmp(argv[1], "depends") == 0) |
|
||||
/* Nothing. */ |
|
||||
return 0; |
|
||||
|
|
||||
return 1; |
|
||||
} |
|
@ -1,40 +0,0 @@ |
|||||
/* CC0 (Public domain) - see LICENSE file for details */ |
|
||||
#ifndef CCAN_BUILD_ASSERT_H |
|
||||
#define CCAN_BUILD_ASSERT_H |
|
||||
|
|
||||
/**
|
|
||||
* BUILD_ASSERT - assert a build-time dependency. |
|
||||
* @cond: the compile-time condition which must be true. |
|
||||
* |
|
||||
* Your compile will fail if the condition isn't true, or can't be evaluated |
|
||||
* by the compiler. This can only be used within a function. |
|
||||
* |
|
||||
* Example: |
|
||||
* #include <stddef.h> |
|
||||
* ... |
|
||||
* static char *foo_to_char(struct foo *foo) |
|
||||
* { |
|
||||
* // This code needs string to be at start of foo.
|
|
||||
* BUILD_ASSERT(offsetof(struct foo, string) == 0); |
|
||||
* return (char *)foo; |
|
||||
* } |
|
||||
*/ |
|
||||
#define BUILD_ASSERT(cond) \ |
|
||||
do { (void) sizeof(char [1 - 2*!(cond)]); } while(0) |
|
||||
|
|
||||
/**
|
|
||||
* BUILD_ASSERT_OR_ZERO - assert a build-time dependency, as an expression. |
|
||||
* @cond: the compile-time condition which must be true. |
|
||||
* |
|
||||
* Your compile will fail if the condition isn't true, or can't be evaluated |
|
||||
* by the compiler. This can be used in an expression: its value is "0". |
|
||||
* |
|
||||
* Example: |
|
||||
* #define foo_to_char(foo) \ |
|
||||
* ((char *)(foo) \ |
|
||||
* + BUILD_ASSERT_OR_ZERO(offsetof(struct foo, string) == 0)) |
|
||||
*/ |
|
||||
#define BUILD_ASSERT_OR_ZERO(cond) \ |
|
||||
(sizeof(char [1 - 2*!(cond)]) - 1) |
|
||||
|
|
||||
#endif /* CCAN_BUILD_ASSERT_H */ |
|
@ -1,10 +0,0 @@ |
|||||
#include <ccan/build_assert/build_assert.h> |
|
||||
|
|
||||
int main(int argc, char *argv[]) |
|
||||
{ |
|
||||
#ifdef FAIL |
|
||||
return BUILD_ASSERT_OR_ZERO(1 == 0); |
|
||||
#else |
|
||||
return 0; |
|
||||
#endif |
|
||||
} |
|
@ -1,9 +0,0 @@ |
|||||
#include <ccan/build_assert/build_assert.h> |
|
||||
|
|
||||
int main(int argc, char *argv[]) |
|
||||
{ |
|
||||
#ifdef FAIL |
|
||||
BUILD_ASSERT(1 == 0); |
|
||||
#endif |
|
||||
return 0; |
|
||||
} |
|
@ -1,7 +0,0 @@ |
|||||
#include <ccan/build_assert/build_assert.h> |
|
||||
|
|
||||
int main(int argc, char *argv[]) |
|
||||
{ |
|
||||
BUILD_ASSERT(1 == 1); |
|
||||
return 0; |
|
||||
} |
|
@ -1,9 +0,0 @@ |
|||||
#include <ccan/build_assert/build_assert.h> |
|
||||
#include <ccan/tap/tap.h> |
|
||||
|
|
||||
int main(int argc, char *argv[]) |
|
||||
{ |
|
||||
plan_tests(1); |
|
||||
ok1(BUILD_ASSERT_OR_ZERO(1 == 1) == 0); |
|
||||
return exit_status(); |
|
||||
} |
|
@ -1 +0,0 @@ |
|||||
../../licenses/CC0 |
|
@ -1,64 +0,0 @@ |
|||||
#include "config.h" |
|
||||
#include <string.h> |
|
||||
#include <stdio.h> |
|
||||
|
|
||||
/** |
|
||||
* compiler - macros for common compiler extensions |
|
||||
* |
|
||||
* Abstracts away some compiler hints. Currently these include: |
|
||||
* - COLD |
|
||||
* For functions not called in fast paths (aka. cold functions) |
|
||||
* - PRINTF_FMT |
|
||||
* For functions which take printf-style parameters. |
|
||||
* - CONST_FUNCTION |
|
||||
* For functions which return the same value for same parameters. |
|
||||
* - NEEDED |
|
||||
* For functions and variables which must be emitted even if unused. |
|
||||
* - UNNEEDED |
|
||||
* For functions and variables which need not be emitted if unused. |
|
||||
* - UNUSED |
|
||||
* For parameters which are not used. |
|
||||
* - IS_COMPILE_CONSTANT() |
|
||||
* For using different tradeoffs for compiletime vs runtime evaluation. |
|
||||
* |
|
||||
* License: CC0 (Public domain) |
|
||||
* Author: Rusty Russell <rusty@rustcorp.com.au> |
|
||||
* |
|
||||
* Example: |
|
||||
* #include <ccan/compiler/compiler.h> |
|
||||
* #include <stdio.h> |
|
||||
* #include <stdarg.h> |
|
||||
* |
|
||||
* // Example of a (slow-path) logging function. |
|
||||
* static int log_threshold = 2; |
|
||||
* static void COLD PRINTF_FMT(2,3) |
|
||||
* logger(int level, const char *fmt, ...) |
|
||||
* { |
|
||||
* va_list ap; |
|
||||
* va_start(ap, fmt); |
|
||||
* if (level >= log_threshold) |
|
||||
* vfprintf(stderr, fmt, ap); |
|
||||
* va_end(ap); |
|
||||
* } |
|
||||
* |
|
||||
* int main(int argc, char *argv[]) |
|
||||
* { |
|
||||
* if (argc != 1) { |
|
||||
* logger(3, "Don't want %i arguments!\n", argc-1); |
|
||||
* return 1; |
|
||||
* } |
|
||||
* return 0; |
|
||||
* } |
|
||||
*/ |
|
||||
int main(int argc, char *argv[]) |
|
||||
{ |
|
||||
/* Expect exactly one argument */ |
|
||||
if (argc != 2) |
|
||||
return 1; |
|
||||
|
|
||||
if (strcmp(argv[1], "depends") == 0) { |
|
||||
return 0; |
|
||||
} |
|
||||
|
|
||||
return 1; |
|
||||
} |
|
@ -1,231 +0,0 @@ |
|||||
/* CC0 (Public domain) - see LICENSE file for details */ |
|
||||
#ifndef CCAN_COMPILER_H |
|
||||
#define CCAN_COMPILER_H |
|
||||
#include "config.h" |
|
||||
|
|
||||
#ifndef COLD |
|
||||
#if HAVE_ATTRIBUTE_COLD |
|
||||
/**
|
|
||||
* COLD - a function is unlikely to be called. |
|
||||
* |
|
||||
* Used to mark an unlikely code path and optimize appropriately. |
|
||||
* It is usually used on logging or error routines. |
|
||||
* |
|
||||
* Example: |
|
||||
* static void COLD moan(const char *reason) |
|
||||
* { |
|
||||
* fprintf(stderr, "Error: %s (%s)\n", reason, strerror(errno)); |
|
||||
* } |
|
||||
*/ |
|
||||
#define COLD __attribute__((__cold__)) |
|
||||
#else |
|
||||
#define COLD |
|
||||
#endif |
|
||||
#endif |
|
||||
|
|
||||
#ifndef NORETURN |
|
||||
#if HAVE_ATTRIBUTE_NORETURN |
|
||||
/**
|
|
||||
* NORETURN - a function does not return |
|
||||
* |
|
||||
* Used to mark a function which exits; useful for suppressing warnings. |
|
||||
* |
|
||||
* Example: |
|
||||
* static void NORETURN fail(const char *reason) |
|
||||
* { |
|
||||
* fprintf(stderr, "Error: %s (%s)\n", reason, strerror(errno)); |
|
||||
* exit(1); |
|
||||
* } |
|
||||
*/ |
|
||||
#define NORETURN __attribute__((__noreturn__)) |
|
||||
#else |
|
||||
#define NORETURN |
|
||||
#endif |
|
||||
#endif |
|
||||
|
|
||||
#ifndef PRINTF_FMT |
|
||||
#if HAVE_ATTRIBUTE_PRINTF |
|
||||
/**
|
|
||||
* PRINTF_FMT - a function takes printf-style arguments |
|
||||
* @nfmt: the 1-based number of the function's format argument. |
|
||||
* @narg: the 1-based number of the function's first variable argument. |
|
||||
* |
|
||||
* This allows the compiler to check your parameters as it does for printf(). |
|
||||
* |
|
||||
* Example: |
|
||||
* void PRINTF_FMT(2,3) my_printf(const char *prefix, const char *fmt, ...); |
|
||||
*/ |
|
||||
#define PRINTF_FMT(nfmt, narg) \ |
|
||||
__attribute__((format(__printf__, nfmt, narg))) |
|
||||
#else |
|
||||
#define PRINTF_FMT(nfmt, narg) |
|
||||
#endif |
|
||||
#endif |
|
||||
|
|
||||
#ifndef CONST_FUNCTION |
|
||||
#if HAVE_ATTRIBUTE_CONST |
|
||||
/**
|
|
||||
* CONST_FUNCTION - a function's return depends only on its argument |
|
||||
* |
|
||||
* This allows the compiler to assume that the function will return the exact |
|
||||
* same value for the exact same arguments. This implies that the function |
|
||||
* must not use global variables, or dereference pointer arguments. |
|
||||
*/ |
|
||||
#define CONST_FUNCTION __attribute__((__const__)) |
|
||||
#else |
|
||||
#define CONST_FUNCTION |
|
||||
#endif |
|
||||
|
|
||||
#ifndef PURE_FUNCTION |
|
||||
#if HAVE_ATTRIBUTE_PURE |
|
||||
/**
|
|
||||
* PURE_FUNCTION - a function is pure |
|
||||
* |
|
||||
* A pure function is one that has no side effects other than it's return value |
|
||||
* and uses no inputs other than it's arguments and global variables. |
|
||||
*/ |
|
||||
#define PURE_FUNCTION __attribute__((__pure__)) |
|
||||
#else |
|
||||
#define PURE_FUNCTION |
|
||||
#endif |
|
||||
#endif |
|
||||
#endif |
|
||||
|
|
||||
#if HAVE_ATTRIBUTE_UNUSED |
|
||||
#ifndef UNNEEDED |
|
||||
/**
|
|
||||
* UNNEEDED - a variable/function may not be needed |
|
||||
* |
|
||||
* This suppresses warnings about unused variables or functions, but tells |
|
||||
* the compiler that if it is unused it need not emit it into the source code. |
|
||||
* |
|
||||
* Example: |
|
||||
* // With some preprocessor options, this is unnecessary.
|
|
||||
* static UNNEEDED int counter; |
|
||||
* |
|
||||
* // With some preprocessor options, this is unnecessary.
|
|
||||
* static UNNEEDED void add_to_counter(int add) |
|
||||
* { |
|
||||
* counter += add; |
|
||||
* } |
|
||||
*/ |
|
||||
#define UNNEEDED __attribute__((__unused__)) |
|
||||
#endif |
|
||||
|
|
||||
#ifndef NEEDED |
|
||||
#if HAVE_ATTRIBUTE_USED |
|
||||
/**
|
|
||||
* NEEDED - a variable/function is needed |
|
||||
* |
|
||||
* This suppresses warnings about unused variables or functions, but tells |
|
||||
* the compiler that it must exist even if it (seems) unused. |
|
||||
* |
|
||||
* Example: |
|
||||
* // Even if this is unused, these are vital for debugging.
|
|
||||
* static NEEDED int counter; |
|
||||
* static NEEDED void dump_counter(void) |
|
||||
* { |
|
||||
* printf("Counter is %i\n", counter); |
|
||||
* } |
|
||||
*/ |
|
||||
#define NEEDED __attribute__((__used__)) |
|
||||
#else |
|
||||
/* Before used, unused functions and vars were always emitted. */ |
|
||||
#define NEEDED __attribute__((__unused__)) |
|
||||
#endif |
|
||||
#endif |
|
||||
|
|
||||
#ifndef UNUSED |
|
||||
/**
|
|
||||
* UNUSED - a parameter is unused |
|
||||
* |
|
||||
* Some compilers (eg. gcc with -W or -Wunused) warn about unused |
|
||||
* function parameters. This suppresses such warnings and indicates |
|
||||
* to the reader that it's deliberate. |
|
||||
* |
|
||||
* Example: |
|
||||
* // This is used as a callback, so needs to have this prototype.
|
|
||||
* static int some_callback(void *unused UNUSED) |
|
||||
* { |
|
||||
* return 0; |
|
||||
* } |
|
||||
*/ |
|
||||
#define UNUSED __attribute__((__unused__)) |
|
||||
#endif |
|
||||
#else |
|
||||
#ifndef UNNEEDED |
|
||||
#define UNNEEDED |
|
||||
#endif |
|
||||
#ifndef NEEDED |
|
||||
#define NEEDED |
|
||||
#endif |
|
||||
#ifndef UNUSED |
|
||||
#define UNUSED |
|
||||
#endif |
|
||||
#endif |
|
||||
|
|
||||
#ifndef IS_COMPILE_CONSTANT |
|
||||
#if HAVE_BUILTIN_CONSTANT_P |
|
||||
/**
|
|
||||
* IS_COMPILE_CONSTANT - does the compiler know the value of this expression? |
|
||||
* @expr: the expression to evaluate |
|
||||
* |
|
||||
* When an expression manipulation is complicated, it is usually better to |
|
||||
* implement it in a function. However, if the expression being manipulated is |
|
||||
* known at compile time, it is better to have the compiler see the entire |
|
||||
* expression so it can simply substitute the result. |
|
||||
* |
|
||||
* This can be done using the IS_COMPILE_CONSTANT() macro. |
|
||||
* |
|
||||
* Example: |
|
||||
* enum greek { ALPHA, BETA, GAMMA, DELTA, EPSILON }; |
|
||||
* |
|
||||
* // Out-of-line version.
|
|
||||
* const char *greek_name(enum greek greek); |
|
||||
* |
|
||||
* // Inline version.
|
|
||||
* static inline const char *_greek_name(enum greek greek) |
|
||||
* { |
|
||||
* switch (greek) { |
|
||||
* case ALPHA: return "alpha"; |
|
||||
* case BETA: return "beta"; |
|
||||
* case GAMMA: return "gamma"; |
|
||||
* case DELTA: return "delta"; |
|
||||
* case EPSILON: return "epsilon"; |
|
||||
* default: return "**INVALID**"; |
|
||||
* } |
|
||||
* } |
|
||||
* |
|
||||
* // Use inline if compiler knows answer. Otherwise call function
|
|
||||
* // to avoid copies of the same code everywhere.
|
|
||||
* #define greek_name(g) \ |
|
||||
* (IS_COMPILE_CONSTANT(greek) ? _greek_name(g) : greek_name(g)) |
|
||||
*/ |
|
||||
#define IS_COMPILE_CONSTANT(expr) __builtin_constant_p(expr) |
|
||||
#else |
|
||||
/* If we don't know, assume it's not. */ |
|
||||
#define IS_COMPILE_CONSTANT(expr) 0 |
|
||||
#endif |
|
||||
#endif |
|
||||
|
|
||||
#ifndef WARN_UNUSED_RESULT |
|
||||
#if HAVE_WARN_UNUSED_RESULT |
|
||||
/**
|
|
||||
* WARN_UNUSED_RESULT - warn if a function return value is unused. |
|
||||
* |
|
||||
* Used to mark a function where it is extremely unlikely that the caller |
|
||||
* can ignore the result, eg realloc(). |
|
||||
* |
|
||||
* Example: |
|
||||
* // buf param may be freed by this; need return value!
|
|
||||
* static char *WARN_UNUSED_RESULT enlarge(char *buf, unsigned *size) |
|
||||
* { |
|
||||
* return realloc(buf, (*size) *= 2); |
|
||||
* } |
|
||||
*/ |
|
||||
#define WARN_UNUSED_RESULT __attribute__((__warn_unused_result__)) |
|
||||
#else |
|
||||
#define WARN_UNUSED_RESULT |
|
||||
#endif |
|
||||
#endif |
|
||||
#endif /* CCAN_COMPILER_H */ |
|
@ -1,22 +0,0 @@ |
|||||
#include <ccan/compiler/compiler.h> |
|
||||
|
|
||||
static void PRINTF_FMT(2,3) my_printf(int x, const char *fmt, ...) |
|
||||
{ |
|
||||
} |
|
||||
|
|
||||
int main(int argc, char *argv[]) |
|
||||
{ |
|
||||
unsigned int i = 0; |
|
||||
|
|
||||
my_printf(1, "Not a pointer " |
|
||||
#ifdef FAIL |
|
||||
"%p", |
|
||||
#if !HAVE_ATTRIBUTE_PRINTF |
|
||||
#error "Unfortunately we don't fail if !HAVE_ATTRIBUTE_PRINTF." |
|
||||
#endif |
|
||||
#else |
|
||||
"%i", |
|
||||
#endif |
|
||||
i); |
|
||||
return 0; |
|
||||
} |
|
@ -1,15 +0,0 @@ |
|||||
#include <ccan/compiler/compiler.h> |
|
||||
#include <ccan/tap/tap.h> |
|
||||
|
|
||||
int main(int argc, char *argv[]) |
|
||||
{ |
|
||||
plan_tests(2); |
|
||||
|
|
||||
ok1(!IS_COMPILE_CONSTANT(argc)); |
|
||||
#if HAVE_BUILTIN_CONSTANT_P |
|
||||
ok1(IS_COMPILE_CONSTANT(7)); |
|
||||
#else |
|
||||
pass("If !HAVE_BUILTIN_CONSTANT_P, IS_COMPILE_CONSTANT always false"); |
|
||||
#endif |
|
||||
return exit_status(); |
|
||||
} |
|
@ -1 +0,0 @@ |
|||||
../../../licenses/BSD-MIT |
|
@ -1,55 +0,0 @@ |
|||||
#include "config.h" |
|
||||
#include <stdio.h> |
|
||||
#include <string.h> |
|
||||
|
|
||||
/** |
|
||||
* crypto/ripemd160 - implementation of RIPEMD 160 bit digest algorithm. |
|
||||
* |
|
||||
* This code is either a wrapper for openssl (if CCAN_CRYPTO_RIPEMD160_USE_OPENSSL |
|
||||
* is defined) or an open-coded implementation based on Bitcoin's. |
|
||||
* |
|
||||
* License: BSD-MIT |
|
||||
* Maintainer: Rusty Russell <rusty@rustcorp.com.au> |
|
||||
* |
|
||||
* Example: |
|
||||
* #include <ccan/crypto/ripemd160/ripemd160.h> |
|
||||
* #include <err.h> |
|
||||
* #include <stdio.h> |
|
||||
* #include <string.h> |
|
||||
* |
|
||||
* // Simple demonstration: idential strings will have the same hash, but |
|
||||
* // two different strings will not. |
|
||||
* int main(int argc, char *argv[]) |
|
||||
* { |
|
||||
* struct ripemd160 hash1, hash2; |
|
||||
* |
|
||||
* if (argc != 3) |
|
||||
* errx(1, "Usage: %s <string1> <string2>", argv[0]); |
|
||||
* |
|
||||
* ripemd160(&hash1, argv[1], strlen(argv[1])); |
|
||||
* ripemd160(&hash2, argv[2], strlen(argv[2])); |
|
||||
* printf("Hash is %s\n", memcmp(&hash1, &hash2, sizeof(hash1)) |
|
||||
* ? "different" : "same"); |
|
||||
* return 0; |
|
||||
* } |
|
||||
*/ |
|
||||
int main(int argc, char *argv[]) |
|
||||
{ |
|
||||
/* Expect exactly one argument */ |
|
||||
if (argc != 2) |
|
||||
return 1; |
|
||||
|
|
||||
if (strcmp(argv[1], "depends") == 0) { |
|
||||
printf("ccan/endian\n"); |
|
||||
return 0; |
|
||||
} |
|
||||
|
|
||||
if (strcmp(argv[1], "libs") == 0) { |
|
||||
#ifdef CCAN_CRYPTO_RIPEMD160_USE_OPENSSL |
|
||||
printf("crypto\n"); |
|
||||
#endif |
|
||||
return 0; |
|
||||
} |
|
||||
|
|
||||
return 1; |
|
||||
} |
|
@ -1,402 +0,0 @@ |
|||||
/* MIT (BSD) license - see LICENSE file for details */ |
|
||||
/* RIPEMD core code translated from the Bitcoin project's C++:
|
|
||||
* |
|
||||
* src/crypto/ripemd160.cpp commit f914f1a746d7f91951c1da262a4a749dd3ebfa71 |
|
||||
* Copyright (c) 2014 The Bitcoin Core developers |
|
||||
* Distributed under the MIT software license, see the accompanying |
|
||||
* file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
||||
*/ |
|
||||
#include <ccan/crypto/ripemd160/ripemd160.h> |
|
||||
#include <ccan/endian/endian.h> |
|
||||
#include <ccan/compiler/compiler.h> |
|
||||
#include <stdbool.h> |
|
||||
#include <assert.h> |
|
||||
#include <string.h> |
|
||||
|
|
||||
static void invalidate_ripemd160(struct ripemd160_ctx *ctx) |
|
||||
{ |
|
||||
#ifdef CCAN_CRYPTO_RIPEMD160_USE_OPENSSL |
|
||||
ctx->c.num = -1U; |
|
||||
#else |
|
||||
ctx->bytes = -1ULL; |
|
||||
#endif |
|
||||
} |
|
||||
|
|
||||
static void check_ripemd160(struct ripemd160_ctx *ctx UNUSED) |
|
||||
{ |
|
||||
#ifdef CCAN_CRYPTO_RIPEMD160_USE_OPENSSL |
|
||||
assert(ctx->c.num != -1U); |
|
||||
#else |
|
||||
assert(ctx->bytes != -1ULL); |
|
||||
#endif |
|
||||
} |
|
||||
|
|
||||
#ifdef CCAN_CRYPTO_RIPEMD160_USE_OPENSSL |
|
||||
void ripemd160_init(struct ripemd160_ctx *ctx) |
|
||||
{ |
|
||||
RIPEMD160_Init(&ctx->c); |
|
||||
} |
|
||||
|
|
||||
void ripemd160_update(struct ripemd160_ctx *ctx, const void *p, size_t size) |
|
||||
{ |
|
||||
check_ripemd160(ctx); |
|
||||
RIPEMD160_Update(&ctx->c, p, size); |
|
||||
} |
|
||||
|
|
||||
void ripemd160_done(struct ripemd160_ctx *ctx, struct ripemd160 *res) |
|
||||
{ |
|
||||
RIPEMD160_Final(res->u.u8, &ctx->c); |
|
||||
invalidate_ripemd160(ctx); |
|
||||
} |
|
||||
#else |
|
||||
inline static uint32_t f1(uint32_t x, uint32_t y, uint32_t z) { return x ^ y ^ z; } |
|
||||
inline static uint32_t f2(uint32_t x, uint32_t y, uint32_t z) { return (x & y) | (~x & z); } |
|
||||
inline static uint32_t f3(uint32_t x, uint32_t y, uint32_t z) { return (x | ~y) ^ z; } |
|
||||
inline static uint32_t f4(uint32_t x, uint32_t y, uint32_t z) { return (x & z) | (y & ~z); } |
|
||||
inline static uint32_t f5(uint32_t x, uint32_t y, uint32_t z) { return x ^ (y | ~z); } |
|
||||
|
|
||||
/** Initialize RIPEMD-160 state. */ |
|
||||
inline static void Initialize(uint32_t* s) |
|
||||
{ |
|
||||
s[0] = 0x67452301ul; |
|
||||
s[1] = 0xEFCDAB89ul; |
|
||||
s[2] = 0x98BADCFEul; |
|
||||
s[3] = 0x10325476ul; |
|
||||
s[4] = 0xC3D2E1F0ul; |
|
||||
} |
|
||||
|
|
||||
inline static uint32_t rol(uint32_t x, int i) { return (x << i) | (x >> (32 - i)); } |
|
||||
|
|
||||
inline static void Round(uint32_t *a, uint32_t b UNUSED, uint32_t *c, uint32_t d UNUSED, uint32_t e, uint32_t f, uint32_t x, uint32_t k, int r) |
|
||||
{ |
|
||||
*a = rol(*a + f + x + k, r) + e; |
|
||||
*c = rol(*c, 10); |
|
||||
} |
|
||||
|
|
||||
inline static void R11(uint32_t *a, uint32_t b, uint32_t *c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f1(b, *c, d), x, 0, r); } |
|
||||
inline static void R21(uint32_t *a, uint32_t b, uint32_t *c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f2(b, *c, d), x, 0x5A827999ul, r); } |
|
||||
inline static void R31(uint32_t *a, uint32_t b, uint32_t *c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f3(b, *c, d), x, 0x6ED9EBA1ul, r); } |
|
||||
inline static void R41(uint32_t *a, uint32_t b, uint32_t *c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f4(b, *c, d), x, 0x8F1BBCDCul, r); } |
|
||||
inline static void R51(uint32_t *a, uint32_t b, uint32_t *c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f5(b, *c, d), x, 0xA953FD4Eul, r); } |
|
||||
|
|
||||
inline static void R12(uint32_t *a, uint32_t b, uint32_t *c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f5(b, *c, d), x, 0x50A28BE6ul, r); } |
|
||||
inline static void R22(uint32_t *a, uint32_t b, uint32_t *c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f4(b, *c, d), x, 0x5C4DD124ul, r); } |
|
||||
inline static void R32(uint32_t *a, uint32_t b, uint32_t *c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f3(b, *c, d), x, 0x6D703EF3ul, r); } |
|
||||
inline static void R42(uint32_t *a, uint32_t b, uint32_t *c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f2(b, *c, d), x, 0x7A6D76E9ul, r); } |
|
||||
inline static void R52(uint32_t *a, uint32_t b, uint32_t *c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f1(b, *c, d), x, 0, r); } |
|
||||
|
|
||||
/** Perform a RIPEMD-160 transformation, processing a 64-byte chunk. */ |
|
||||
static void Transform(uint32_t *s, const uint32_t *chunk) |
|
||||
{ |
|
||||
uint32_t a1 = s[0], b1 = s[1], c1 = s[2], d1 = s[3], e1 = s[4]; |
|
||||
uint32_t a2 = a1, b2 = b1, c2 = c1, d2 = d1, e2 = e1; |
|
||||
uint32_t w0 = le32_to_cpu(chunk[0]), w1 = le32_to_cpu(chunk[1]), w2 = le32_to_cpu(chunk[2]), w3 = le32_to_cpu(chunk[3]); |
|
||||
uint32_t w4 = le32_to_cpu(chunk[4]), w5 = le32_to_cpu(chunk[5]), w6 = le32_to_cpu(chunk[6]), w7 = le32_to_cpu(chunk[7]); |
|
||||
uint32_t w8 = le32_to_cpu(chunk[8]), w9 = le32_to_cpu(chunk[9]), w10 = le32_to_cpu(chunk[10]), w11 = le32_to_cpu(chunk[11]); |
|
||||
uint32_t w12 = le32_to_cpu(chunk[12]), w13 = le32_to_cpu(chunk[13]), w14 = le32_to_cpu(chunk[14]), w15 = le32_to_cpu(chunk[15]); |
|
||||
uint32_t t; |
|
||||
|
|
||||
R11(&a1, b1, &c1, d1, e1, w0, 11); |
|
||||
R12(&a2, b2, &c2, d2, e2, w5, 8); |
|
||||
R11(&e1, a1, &b1, c1, d1, w1, 14); |
|
||||
R12(&e2, a2, &b2, c2, d2, w14, 9); |
|
||||
R11(&d1, e1, &a1, b1, c1, w2, 15); |
|
||||
R12(&d2, e2, &a2, b2, c2, w7, 9); |
|
||||
R11(&c1, d1, &e1, a1, b1, w3, 12); |
|
||||
R12(&c2, d2, &e2, a2, b2, w0, 11); |
|
||||
R11(&b1, c1, &d1, e1, a1, w4, 5); |
|
||||
R12(&b2, c2, &d2, e2, a2, w9, 13); |
|
||||
R11(&a1, b1, &c1, d1, e1, w5, 8); |
|
||||
R12(&a2, b2, &c2, d2, e2, w2, 15); |
|
||||
R11(&e1, a1, &b1, c1, d1, w6, 7); |
|
||||
R12(&e2, a2, &b2, c2, d2, w11, 15); |
|
||||
R11(&d1, e1, &a1, b1, c1, w7, 9); |
|
||||
R12(&d2, e2, &a2, b2, c2, w4, 5); |
|
||||
R11(&c1, d1, &e1, a1, b1, w8, 11); |
|
||||
R12(&c2, d2, &e2, a2, b2, w13, 7); |
|
||||
R11(&b1, c1, &d1, e1, a1, w9, 13); |
|
||||
R12(&b2, c2, &d2, e2, a2, w6, 7); |
|
||||
R11(&a1, b1, &c1, d1, e1, w10, 14); |
|
||||
R12(&a2, b2, &c2, d2, e2, w15, 8); |
|
||||
R11(&e1, a1, &b1, c1, d1, w11, 15); |
|
||||
R12(&e2, a2, &b2, c2, d2, w8, 11); |
|
||||
R11(&d1, e1, &a1, b1, c1, w12, 6); |
|
||||
R12(&d2, e2, &a2, b2, c2, w1, 14); |
|
||||
R11(&c1, d1, &e1, a1, b1, w13, 7); |
|
||||
R12(&c2, d2, &e2, a2, b2, w10, 14); |
|
||||
R11(&b1, c1, &d1, e1, a1, w14, 9); |
|
||||
R12(&b2, c2, &d2, e2, a2, w3, 12); |
|
||||
R11(&a1, b1, &c1, d1, e1, w15, 8); |
|
||||
R12(&a2, b2, &c2, d2, e2, w12, 6); |
|
||||
|
|
||||
R21(&e1, a1, &b1, c1, d1, w7, 7); |
|
||||
R22(&e2, a2, &b2, c2, d2, w6, 9); |
|
||||
R21(&d1, e1, &a1, b1, c1, w4, 6); |
|
||||
R22(&d2, e2, &a2, b2, c2, w11, 13); |
|
||||
R21(&c1, d1, &e1, a1, b1, w13, 8); |
|
||||
R22(&c2, d2, &e2, a2, b2, w3, 15); |
|
||||
R21(&b1, c1, &d1, e1, a1, w1, 13); |
|
||||
R22(&b2, c2, &d2, e2, a2, w7, 7); |
|
||||
R21(&a1, b1, &c1, d1, e1, w10, 11); |
|
||||
R22(&a2, b2, &c2, d2, e2, w0, 12); |
|
||||
R21(&e1, a1, &b1, c1, d1, w6, 9); |
|
||||
R22(&e2, a2, &b2, c2, d2, w13, 8); |
|
||||
R21(&d1, e1, &a1, b1, c1, w15, 7); |
|
||||
R22(&d2, e2, &a2, b2, c2, w5, 9); |
|
||||
R21(&c1, d1, &e1, a1, b1, w3, 15); |
|
||||
R22(&c2, d2, &e2, a2, b2, w10, 11); |
|
||||
R21(&b1, c1, &d1, e1, a1, w12, 7); |
|
||||
R22(&b2, c2, &d2, e2, a2, w14, 7); |
|
||||
R21(&a1, b1, &c1, d1, e1, w0, 12); |
|
||||
R22(&a2, b2, &c2, d2, e2, w15, 7); |
|
||||
R21(&e1, a1, &b1, c1, d1, w9, 15); |
|
||||
R22(&e2, a2, &b2, c2, d2, w8, 12); |
|
||||
R21(&d1, e1, &a1, b1, c1, w5, 9); |
|
||||
R22(&d2, e2, &a2, b2, c2, w12, 7); |
|
||||
R21(&c1, d1, &e1, a1, b1, w2, 11); |
|
||||
R22(&c2, d2, &e2, a2, b2, w4, 6); |
|
||||
R21(&b1, c1, &d1, e1, a1, w14, 7); |
|
||||
R22(&b2, c2, &d2, e2, a2, w9, 15); |
|
||||
R21(&a1, b1, &c1, d1, e1, w11, 13); |
|
||||
R22(&a2, b2, &c2, d2, e2, w1, 13); |
|
||||
R21(&e1, a1, &b1, c1, d1, w8, 12); |
|
||||
R22(&e2, a2, &b2, c2, d2, w2, 11); |
|
||||
|
|
||||
R31(&d1, e1, &a1, b1, c1, w3, 11); |
|
||||
R32(&d2, e2, &a2, b2, c2, w15, 9); |
|
||||
R31(&c1, d1, &e1, a1, b1, w10, 13); |
|
||||
R32(&c2, d2, &e2, a2, b2, w5, 7); |
|
||||
R31(&b1, c1, &d1, e1, a1, w14, 6); |
|
||||
R32(&b2, c2, &d2, e2, a2, w1, 15); |
|
||||
R31(&a1, b1, &c1, d1, e1, w4, 7); |
|
||||
R32(&a2, b2, &c2, d2, e2, w3, 11); |
|
||||
R31(&e1, a1, &b1, c1, d1, w9, 14); |
|
||||
R32(&e2, a2, &b2, c2, d2, w7, 8); |
|
||||
R31(&d1, e1, &a1, b1, c1, w15, 9); |
|
||||
R32(&d2, e2, &a2, b2, c2, w14, 6); |
|
||||
R31(&c1, d1, &e1, a1, b1, w8, 13); |
|
||||
R32(&c2, d2, &e2, a2, b2, w6, 6); |
|
||||
R31(&b1, c1, &d1, e1, a1, w1, 15); |
|
||||
R32(&b2, c2, &d2, e2, a2, w9, 14); |
|
||||
R31(&a1, b1, &c1, d1, e1, w2, 14); |
|
||||
R32(&a2, b2, &c2, d2, e2, w11, 12); |
|
||||
R31(&e1, a1, &b1, c1, d1, w7, 8); |
|
||||
R32(&e2, a2, &b2, c2, d2, w8, 13); |
|
||||
R31(&d1, e1, &a1, b1, c1, w0, 13); |
|
||||
R32(&d2, e2, &a2, b2, c2, w12, 5); |
|
||||
R31(&c1, d1, &e1, a1, b1, w6, 6); |
|
||||
R32(&c2, d2, &e2, a2, b2, w2, 14); |
|
||||
R31(&b1, c1, &d1, e1, a1, w13, 5); |
|
||||
R32(&b2, c2, &d2, e2, a2, w10, 13); |
|
||||
R31(&a1, b1, &c1, d1, e1, w11, 12); |
|
||||
R32(&a2, b2, &c2, d2, e2, w0, 13); |
|
||||
R31(&e1, a1, &b1, c1, d1, w5, 7); |
|
||||
R32(&e2, a2, &b2, c2, d2, w4, 7); |
|
||||
R31(&d1, e1, &a1, b1, c1, w12, 5); |
|
||||
R32(&d2, e2, &a2, b2, c2, w13, 5); |
|
||||
|
|
||||
R41(&c1, d1, &e1, a1, b1, w1, 11); |
|
||||
R42(&c2, d2, &e2, a2, b2, w8, 15); |
|
||||
R41(&b1, c1, &d1, e1, a1, w9, 12); |
|
||||
R42(&b2, c2, &d2, e2, a2, w6, 5); |
|
||||
R41(&a1, b1, &c1, d1, e1, w11, 14); |
|
||||
R42(&a2, b2, &c2, d2, e2, w4, 8); |
|
||||
R41(&e1, a1, &b1, c1, d1, w10, 15); |
|
||||
R42(&e2, a2, &b2, c2, d2, w1, 11); |
|
||||
R41(&d1, e1, &a1, b1, c1, w0, 14); |
|
||||
R42(&d2, e2, &a2, b2, c2, w3, 14); |
|
||||
R41(&c1, d1, &e1, a1, b1, w8, 15); |
|
||||
R42(&c2, d2, &e2, a2, b2, w11, 14); |
|
||||
R41(&b1, c1, &d1, e1, a1, w12, 9); |
|
||||
R42(&b2, c2, &d2, e2, a2, w15, 6); |
|
||||
R41(&a1, b1, &c1, d1, e1, w4, 8); |
|
||||
R42(&a2, b2, &c2, d2, e2, w0, 14); |
|
||||
R41(&e1, a1, &b1, c1, d1, w13, 9); |
|
||||
R42(&e2, a2, &b2, c2, d2, w5, 6); |
|
||||
R41(&d1, e1, &a1, b1, c1, w3, 14); |
|
||||
R42(&d2, e2, &a2, b2, c2, w12, 9); |
|
||||
R41(&c1, d1, &e1, a1, b1, w7, 5); |
|
||||
R42(&c2, d2, &e2, a2, b2, w2, 12); |
|
||||
R41(&b1, c1, &d1, e1, a1, w15, 6); |
|
||||
R42(&b2, c2, &d2, e2, a2, w13, 9); |
|
||||
R41(&a1, b1, &c1, d1, e1, w14, 8); |
|
||||
R42(&a2, b2, &c2, d2, e2, w9, 12); |
|
||||
R41(&e1, a1, &b1, c1, d1, w5, 6); |
|
||||
R42(&e2, a2, &b2, c2, d2, w7, 5); |
|
||||
R41(&d1, e1, &a1, b1, c1, w6, 5); |
|
||||
R42(&d2, e2, &a2, b2, c2, w10, 15); |
|
||||
R41(&c1, d1, &e1, a1, b1, w2, 12); |
|
||||
R42(&c2, d2, &e2, a2, b2, w14, 8); |
|
||||
|
|
||||
R51(&b1, c1, &d1, e1, a1, w4, 9); |
|
||||
R52(&b2, c2, &d2, e2, a2, w12, 8); |
|
||||
R51(&a1, b1, &c1, d1, e1, w0, 15); |
|
||||
R52(&a2, b2, &c2, d2, e2, w15, 5); |
|
||||
R51(&e1, a1, &b1, c1, d1, w5, 5); |
|
||||
R52(&e2, a2, &b2, c2, d2, w10, 12); |
|
||||
R51(&d1, e1, &a1, b1, c1, w9, 11); |
|
||||
R52(&d2, e2, &a2, b2, c2, w4, 9); |
|
||||
R51(&c1, d1, &e1, a1, b1, w7, 6); |
|
||||
R52(&c2, d2, &e2, a2, b2, w1, 12); |
|
||||
R51(&b1, c1, &d1, e1, a1, w12, 8); |
|
||||
R52(&b2, c2, &d2, e2, a2, w5, 5); |
|
||||
R51(&a1, b1, &c1, d1, e1, w2, 13); |
|
||||
R52(&a2, b2, &c2, d2, e2, w8, 14); |
|
||||
R51(&e1, a1, &b1, c1, d1, w10, 12); |
|
||||
R52(&e2, a2, &b2, c2, d2, w7, 6); |
|
||||
R51(&d1, e1, &a1, b1, c1, w14, 5); |
|
||||
R52(&d2, e2, &a2, b2, c2, w6, 8); |
|
||||
R51(&c1, d1, &e1, a1, b1, w1, 12); |
|
||||
R52(&c2, d2, &e2, a2, b2, w2, 13); |
|
||||
R51(&b1, c1, &d1, e1, a1, w3, 13); |
|
||||
R52(&b2, c2, &d2, e2, a2, w13, 6); |
|
||||
R51(&a1, b1, &c1, d1, e1, w8, 14); |
|
||||
R52(&a2, b2, &c2, d2, e2, w14, 5); |
|
||||
R51(&e1, a1, &b1, c1, d1, w11, 11); |
|
||||
R52(&e2, a2, &b2, c2, d2, w0, 15); |
|
||||
R51(&d1, e1, &a1, b1, c1, w6, 8); |
|
||||
R52(&d2, e2, &a2, b2, c2, w3, 13); |
|
||||
R51(&c1, d1, &e1, a1, b1, w15, 5); |
|
||||
R52(&c2, d2, &e2, a2, b2, w9, 11); |
|
||||
R51(&b1, c1, &d1, e1, a1, w13, 6); |
|
||||
R52(&b2, c2, &d2, e2, a2, w11, 11); |
|
||||
|
|
||||
t = s[0]; |
|
||||
s[0] = s[1] + c1 + d2; |
|
||||
s[1] = s[2] + d1 + e2; |
|
||||
s[2] = s[3] + e1 + a2; |
|
||||
s[3] = s[4] + a1 + b2; |
|
||||
s[4] = t + b1 + c2; |
|
||||
} |
|
||||
|
|
||||
static void add(struct ripemd160_ctx *ctx, const void *p, size_t len) |
|
||||
{ |
|
||||
const unsigned char *data = p; |
|
||||
size_t bufsize = ctx->bytes % 64; |
|
||||
|
|
||||
if (bufsize + len >= 64) { |
|
||||
/* Fill the buffer, and process it. */ |
|
||||
memcpy(ctx->buf.u8 + bufsize, data, 64 - bufsize); |
|
||||
ctx->bytes += 64 - bufsize; |
|
||||
data += 64 - bufsize; |
|
||||
len -= 64 - bufsize; |
|
||||
Transform(ctx->s, ctx->buf.u32); |
|
||||
bufsize = 0; |
|
||||
} |
|
||||
|
|
||||
while (len >= 64) { |
|
||||
/* Process full chunks directly from the source. */ |
|
||||
if (alignment_ok(data, sizeof(uint32_t))) |
|
||||
Transform(ctx->s, (const uint32_t *)data); |
|
||||
else { |
|
||||
memcpy(ctx->buf.u8, data, sizeof(ctx->buf)); |
|
||||
Transform(ctx->s, ctx->buf.u32); |
|
||||
} |
|
||||
ctx->bytes += 64; |
|
||||
data += 64; |
|
||||
len -= 64; |
|
||||
} |
|
||||
|
|
||||
if (len) { |
|
||||
/* Fill the buffer with what remains. */ |
|
||||
memcpy(ctx->buf.u8 + bufsize, data, len); |
|
||||
ctx->bytes += len; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
void ripemd160_init(struct ripemd160_ctx *ctx) |
|
||||
{ |
|
||||
struct ripemd160_ctx init = RIPEMD160_INIT; |
|
||||
*ctx = init; |
|
||||
} |
|
||||
|
|
||||
void ripemd160_update(struct ripemd160_ctx *ctx, const void *p, size_t size) |
|
||||
{ |
|
||||
check_ripemd160(ctx); |
|
||||
add(ctx, p, size); |
|
||||
} |
|
||||
|
|
||||
void ripemd160_done(struct ripemd160_ctx *ctx, struct ripemd160 *res) |
|
||||
{ |
|
||||
static const unsigned char pad[64] = {0x80}; |
|
||||
uint64_t sizedesc; |
|
||||
size_t i; |
|
||||
|
|
||||
sizedesc = cpu_to_le64(ctx->bytes << 3); |
|
||||
/* Add '1' bit to terminate, then all 0 bits, up to next block - 8. */ |
|
||||
add(ctx, pad, 1 + ((119 - (ctx->bytes % 64)) % 64)); |
|
||||
/* Add number of bits of data (big endian) */ |
|
||||
add(ctx, &sizedesc, 8); |
|
||||
for (i = 0; i < sizeof(ctx->s) / sizeof(ctx->s[0]); i++) |
|
||||
res->u.u32[i] = cpu_to_le32(ctx->s[i]); |
|
||||
invalidate_ripemd160(ctx); |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
void ripemd160(struct ripemd160 *ripemd, const void *p, size_t size) |
|
||||
{ |
|
||||
struct ripemd160_ctx ctx; |
|
||||
|
|
||||
ripemd160_init(&ctx); |
|
||||
ripemd160_update(&ctx, p, size); |
|
||||
ripemd160_done(&ctx, ripemd); |
|
||||
CCAN_CLEAR_MEMORY(&ctx, sizeof(ctx)); |
|
||||
} |
|
||||
|
|
||||
void ripemd160_u8(struct ripemd160_ctx *ctx, uint8_t v) |
|
||||
{ |
|
||||
ripemd160_update(ctx, &v, sizeof(v)); |
|
||||
} |
|
||||
|
|
||||
void ripemd160_u16(struct ripemd160_ctx *ctx, uint16_t v) |
|
||||
{ |
|
||||
ripemd160_update(ctx, &v, sizeof(v)); |
|
||||
} |
|
||||
|
|
||||
void ripemd160_u32(struct ripemd160_ctx *ctx, uint32_t v) |
|
||||
{ |
|
||||
ripemd160_update(ctx, &v, sizeof(v)); |
|
||||
} |
|
||||
|
|
||||
void ripemd160_u64(struct ripemd160_ctx *ctx, uint64_t v) |
|
||||
{ |
|
||||
ripemd160_update(ctx, &v, sizeof(v)); |
|
||||
} |
|
||||
|
|
||||
/* Add as little-endian */ |
|
||||
void ripemd160_le16(struct ripemd160_ctx *ctx, uint16_t v) |
|
||||
{ |
|
||||
leint16_t lev = cpu_to_le16(v); |
|
||||
ripemd160_update(ctx, &lev, sizeof(lev)); |
|
||||
} |
|
||||
|
|
||||
void ripemd160_le32(struct ripemd160_ctx *ctx, uint32_t v) |
|
||||
{ |
|
||||
leint32_t lev = cpu_to_le32(v); |
|
||||
ripemd160_update(ctx, &lev, sizeof(lev)); |
|
||||
} |
|
||||
|
|
||||
void ripemd160_le64(struct ripemd160_ctx *ctx, uint64_t v) |
|
||||
{ |
|
||||
leint64_t lev = cpu_to_le64(v); |
|
||||
ripemd160_update(ctx, &lev, sizeof(lev)); |
|
||||
} |
|
||||
|
|
||||
/* Add as big-endian */ |
|
||||
void ripemd160_be16(struct ripemd160_ctx *ctx, uint16_t v) |
|
||||
{ |
|
||||
beint16_t bev = cpu_to_be16(v); |
|
||||
ripemd160_update(ctx, &bev, sizeof(bev)); |
|
||||
} |
|
||||
|
|
||||
void ripemd160_be32(struct ripemd160_ctx *ctx, uint32_t v) |
|
||||
{ |
|
||||
beint32_t bev = cpu_to_be32(v); |
|
||||
ripemd160_update(ctx, &bev, sizeof(bev)); |
|
||||
} |
|
||||
|
|
||||
void ripemd160_be64(struct ripemd160_ctx *ctx, uint64_t v) |
|
||||
{ |
|
||||
beint64_t bev = cpu_to_be64(v); |
|
||||
ripemd160_update(ctx, &bev, sizeof(bev)); |
|
||||
} |
|
@ -1,148 +0,0 @@ |
|||||
#ifndef CCAN_CRYPTO_RIPEMD160_H |
|
||||
#define CCAN_CRYPTO_RIPEMD160_H |
|
||||
/* BSD-MIT - see LICENSE file for details */ |
|
||||
#include "config.h" |
|
||||
#include <stdint.h> |
|
||||
#include <stdlib.h> |
|
||||
|
|
||||
/* Uncomment this to use openssl's RIPEMD160 routines (and link with -lcrypto) */ |
|
||||
/*#define CCAN_CRYPTO_RIPEMD160_USE_OPENSSL 1*/ |
|
||||
|
|
||||
#ifdef CCAN_CRYPTO_RIPEMD160_USE_OPENSSL |
|
||||
#include <openssl/ripemd.h> |
|
||||
#endif |
|
||||
|
|
||||
/**
|
|
||||
* struct ripemd160 - structure representing a completed RIPEMD160. |
|
||||
* @u.u8: an unsigned char array. |
|
||||
* @u.u32: a 32-bit integer array. |
|
||||
* |
|
||||
* Other fields may be added to the union in future. |
|
||||
*/ |
|
||||
struct ripemd160 { |
|
||||
union { |
|
||||
/* Array of chars */ |
|
||||
unsigned char u8[20]; |
|
||||
/* Array of uint32_t */ |
|
||||
uint32_t u32[5]; |
|
||||
} u; |
|
||||
}; |
|
||||
|
|
||||
/**
|
|
||||
* ripemd160 - return ripemd160 of an object. |
|
||||
* @ripemd160: the ripemd160 to fill in |
|
||||
* @p: pointer to memory, |
|
||||
* @size: the number of bytes pointed to by @p |
|
||||
* |
|
||||
* The bytes pointed to by @p is RIPEMD160 hashed into @ripemd160. This is |
|
||||
* equivalent to ripemd160_init(), ripemd160_update() then ripemd160_done(). |
|
||||
*/ |
|
||||
void ripemd160(struct ripemd160 *ripemd, const void *p, size_t size); |
|
||||
|
|
||||
/**
|
|
||||
* struct ripemd160_ctx - structure to store running context for ripemd160 |
|
||||
*/ |
|
||||
struct ripemd160_ctx { |
|
||||
#ifdef CCAN_CRYPTO_RIPEMD160_USE_OPENSSL |
|
||||
RIPEMD160_CTX c; |
|
||||
#else |
|
||||
uint32_t s[5]; |
|
||||
uint64_t bytes; |
|
||||
union { |
|
||||
uint32_t u32[8]; |
|
||||
unsigned char u8[64]; |
|
||||
} buf; |
|
||||
#endif |
|
||||
}; |
|
||||
|
|
||||
/**
|
|
||||
* ripemd160_init - initialize an RIPEMD160 context. |
|
||||
* @ctx: the ripemd160_ctx to initialize |
|
||||
* |
|
||||
* This must be called before ripemd160_update or ripemd160_done, or |
|
||||
* alternately you can assign RIPEMD160_INIT. |
|
||||
* |
|
||||
* If it was already initialized, this forgets anything which was |
|
||||
* hashed before. |
|
||||
* |
|
||||
* Example: |
|
||||
* static void hash_all(const char **arr, struct ripemd160 *hash) |
|
||||
* { |
|
||||
* size_t i; |
|
||||
* struct ripemd160_ctx ctx; |
|
||||
* |
|
||||
* ripemd160_init(&ctx); |
|
||||
* for (i = 0; arr[i]; i++) |
|
||||
* ripemd160_update(&ctx, arr[i], strlen(arr[i])); |
|
||||
* ripemd160_done(&ctx, hash); |
|
||||
* } |
|
||||
*/ |
|
||||
void ripemd160_init(struct ripemd160_ctx *ctx); |
|
||||
|
|
||||
/**
|
|
||||
* RIPEMD160_INIT - initializer for an RIPEMD160 context. |
|
||||
* |
|
||||
* This can be used to staticly initialize an RIPEMD160 context (instead |
|
||||
* of ripemd160_init()). |
|
||||
* |
|
||||
* Example: |
|
||||
* static void hash_all(const char **arr, struct ripemd160 *hash) |
|
||||
* { |
|
||||
* size_t i; |
|
||||
* struct ripemd160_ctx ctx = RIPEMD160_INIT; |
|
||||
* |
|
||||
* for (i = 0; arr[i]; i++) |
|
||||
* ripemd160_update(&ctx, arr[i], strlen(arr[i])); |
|
||||
* ripemd160_done(&ctx, hash); |
|
||||
* } |
|
||||
*/ |
|
||||
#ifdef CCAN_CRYPTO_RIPEMD160_USE_OPENSSL |
|
||||
#define RIPEMD160_INIT \ |
|
||||
{ { 0x67452301ul, 0xEFCDAB89ul, 0x98BADCFEul, 0x10325476ul, \ |
|
||||
0xC3D2E1F0ul, \ |
|
||||
0x0, 0x0, \ |
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, \ |
|
||||
0 } } |
|
||||
#else |
|
||||
#define RIPEMD160_INIT \ |
|
||||
{ { 0x67452301ul, 0xEFCDAB89ul, 0x98BADCFEul, 0x10325476ul, \ |
|
||||
0xC3D2E1F0ul }, 0, {{ 0 }} } |
|
||||
#endif |
|
||||
|
|
||||
/**
|
|
||||
* ripemd160_update - include some memory in the hash. |
|
||||
* @ctx: the ripemd160_ctx to use |
|
||||
* @p: pointer to memory, |
|
||||
* @size: the number of bytes pointed to by @p |
|
||||
* |
|
||||
* You can call this multiple times to hash more data, before calling |
|
||||
* ripemd160_done(). |
|
||||
*/ |
|
||||
void ripemd160_update(struct ripemd160_ctx *ctx, const void *p, size_t size); |
|
||||
|
|
||||
/**
|
|
||||
* ripemd160_done - finish RIPEMD160 and return the hash |
|
||||
* @ctx: the ripemd160_ctx to complete |
|
||||
* @res: the hash to return. |
|
||||
* |
|
||||
* Note that @ctx is *destroyed* by this, and must be reinitialized. |
|
||||
* To avoid that, pass a copy instead. |
|
||||
*/ |
|
||||
void ripemd160_done(struct ripemd160_ctx *ripemd160, struct ripemd160 *res); |
|
||||
|
|
||||
/* Add various types to an RIPEMD160 hash */ |
|
||||
void ripemd160_u8(struct ripemd160_ctx *ctx, uint8_t v); |
|
||||
void ripemd160_u16(struct ripemd160_ctx *ctx, uint16_t v); |
|
||||
void ripemd160_u32(struct ripemd160_ctx *ctx, uint32_t v); |
|
||||
void ripemd160_u64(struct ripemd160_ctx *ctx, uint64_t v); |
|
||||
|
|
||||
/* Add as little-endian */ |
|
||||
void ripemd160_le16(struct ripemd160_ctx *ctx, uint16_t v); |
|
||||
void ripemd160_le32(struct ripemd160_ctx *ctx, uint32_t v); |
|
||||
void ripemd160_le64(struct ripemd160_ctx *ctx, uint64_t v); |
|
||||
|
|
||||
/* Add as big-endian */ |
|
||||
void ripemd160_be16(struct ripemd160_ctx *ctx, uint16_t v); |
|
||||
void ripemd160_be32(struct ripemd160_ctx *ctx, uint32_t v); |
|
||||
void ripemd160_be64(struct ripemd160_ctx *ctx, uint64_t v); |
|
||||
#endif /* CCAN_CRYPTO_RIPEMD160_H */ |
|
@ -1,23 +0,0 @@ |
|||||
#include <ccan/crypto/ripemd160/ripemd160.h> |
|
||||
/* Include the C files directly. */ |
|
||||
#include <ccan/crypto/ripemd160/ripemd160.c> |
|
||||
#include <ccan/tap/tap.h> |
|
||||
|
|
||||
int main(void) |
|
||||
{ |
|
||||
struct ripemd160 h, expected; |
|
||||
static const char zeroes[1000]; |
|
||||
size_t i; |
|
||||
|
|
||||
plan_tests(63); |
|
||||
|
|
||||
/* Test different alignments. */ |
|
||||
ripemd160(&expected, zeroes, sizeof(zeroes) - 64); |
|
||||
for (i = 1; i < 64; i++) { |
|
||||
ripemd160(&h, zeroes + i, sizeof(zeroes) - 64); |
|
||||
ok1(memcmp(&h, &expected, sizeof(h)) == 0); |
|
||||
} |
|
||||
|
|
||||
/* This exits depending on whether all tests passed */ |
|
||||
return exit_status(); |
|
||||
} |
|
@ -1,84 +0,0 @@ |
|||||
#include <ccan/crypto/ripemd160/ripemd160.h> |
|
||||
/* Include the C files directly. */ |
|
||||
#include <ccan/crypto/ripemd160/ripemd160.c> |
|
||||
#include <ccan/tap/tap.h> |
|
||||
|
|
||||
/* Test vectors. */ |
|
||||
struct test { |
|
||||
const char *test; |
|
||||
size_t repetitions; |
|
||||
beint32_t result[5]; |
|
||||
}; |
|
||||
|
|
||||
/* Test vectors from: http://homes.esat.kuleuven.be/~bosselae/ripemd160.html */ |
|
||||
static struct test tests[] = { |
|
||||
{ "", 1, |
|
||||
{ CPU_TO_BE32(0x9c1185a5), CPU_TO_BE32(0xc5e9fc54), |
|
||||
CPU_TO_BE32(0x61280897), CPU_TO_BE32(0x7ee8f548), |
|
||||
CPU_TO_BE32(0xb2258d31) } }, |
|
||||
{ "abc", 1, |
|
||||
{ CPU_TO_BE32(0x8eb208f7), CPU_TO_BE32(0xe05d987a), |
|
||||
CPU_TO_BE32(0x9b044a8e), CPU_TO_BE32(0x98c6b087), |
|
||||
CPU_TO_BE32(0xf15a0bfc) } }, |
|
||||
{ "message digest", 1, |
|
||||
{ CPU_TO_BE32(0x5d0689ef), CPU_TO_BE32(0x49d2fae5), |
|
||||
CPU_TO_BE32(0x72b881b1), CPU_TO_BE32(0x23a85ffa), |
|
||||
CPU_TO_BE32(0x21595f36) } }, |
|
||||
{ "abcdefghijklmnopqrstuvwxyz", 1, |
|
||||
{ CPU_TO_BE32(0xf71c2710), CPU_TO_BE32(0x9c692c1b), |
|
||||
CPU_TO_BE32(0x56bbdceb), CPU_TO_BE32(0x5b9d2865), |
|
||||
CPU_TO_BE32(0xb3708dbc) } }, |
|
||||
{ "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", 1, |
|
||||
{ CPU_TO_BE32(0x12a05338), CPU_TO_BE32(0x4a9c0c88), |
|
||||
CPU_TO_BE32(0xe405a06c), CPU_TO_BE32(0x27dcf49a), |
|
||||
CPU_TO_BE32(0xda62eb2b) } }, |
|
||||
{ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", 1, |
|
||||
{ CPU_TO_BE32(0xb0e20b6e), CPU_TO_BE32(0x31166402), |
|
||||
CPU_TO_BE32(0x86ed3a87), CPU_TO_BE32(0xa5713079), |
|
||||
CPU_TO_BE32(0xb21f5189) } }, |
|
||||
{ "1234567890", 8, |
|
||||
{ CPU_TO_BE32(0x9b752e45), CPU_TO_BE32(0x573d4b39), |
|
||||
CPU_TO_BE32(0xf4dbd332), CPU_TO_BE32(0x3cab82bf), |
|
||||
CPU_TO_BE32(0x63326bfb) } }, |
|
||||
{ "a", 1000000, |
|
||||
{ CPU_TO_BE32(0x52783243), CPU_TO_BE32(0xc1697bdb), |
|
||||
CPU_TO_BE32(0xe16d37f9), CPU_TO_BE32(0x7f68f083), |
|
||||
CPU_TO_BE32(0x25dc1528) } } |
|
||||
}; |
|
||||
|
|
||||
static bool do_test(const struct test *t, bool single) |
|
||||
{ |
|
||||
struct ripemd160 h; |
|
||||
|
|
||||
if (single) { |
|
||||
if (t->repetitions != 1) |
|
||||
return true; |
|
||||
ripemd160(&h, t->test, strlen(t->test)); |
|
||||
} else { |
|
||||
struct ripemd160_ctx ctx = RIPEMD160_INIT; |
|
||||
size_t i; |
|
||||
|
|
||||
for (i = 0; i < t->repetitions; i++) |
|
||||
ripemd160_update(&ctx, t->test, strlen(t->test)); |
|
||||
ripemd160_done(&ctx, &h); |
|
||||
} |
|
||||
|
|
||||
return memcmp(&h.u, t->result, sizeof(t->result)) == 0; |
|
||||
} |
|
||||
|
|
||||
int main(void) |
|
||||
{ |
|
||||
size_t i; |
|
||||
|
|
||||
/* This is how many tests you plan to run */ |
|
||||
plan_tests(sizeof(tests) / sizeof(struct test) * 2); |
|
||||
|
|
||||
for (i = 0; i < sizeof(tests) / sizeof(struct test); i++) |
|
||||
ok1(do_test(&tests[i], false)); |
|
||||
|
|
||||
for (i = 0; i < sizeof(tests) / sizeof(struct test); i++) |
|
||||
ok1(do_test(&tests[i], true)); |
|
||||
|
|
||||
/* This exits depending on whether all tests passed */ |
|
||||
return exit_status(); |
|
||||
} |
|
@ -1,63 +0,0 @@ |
|||||
#include <ccan/crypto/ripemd160/ripemd160.h> |
|
||||
/* Include the C files directly. */ |
|
||||
#include <ccan/crypto/ripemd160/ripemd160.c> |
|
||||
#include <ccan/tap/tap.h> |
|
||||
|
|
||||
static unsigned char arr[] = { |
|
||||
0x12, |
|
||||
#if HAVE_BIG_ENDIAN |
|
||||
/* u16 */ |
|
||||
0x12, 0x34, |
|
||||
/* u32 */ |
|
||||
0x12, 0x34, 0x56, 0x78, |
|
||||
/* u64 */ |
|
||||
0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0, |
|
||||
#else |
|
||||
/* u16 */ |
|
||||
0x34, 0x12, |
|
||||
/* u32 */ |
|
||||
0x78, 0x56, 0x34, 0x12, |
|
||||
/* u64 */ |
|
||||
0xf0, 0xde, 0xbc, 0x9a, 0x78, 0x56, 0x34, 0x12, |
|
||||
#endif |
|
||||
/* le16 */ |
|
||||
0x34, 0x12, |
|
||||
/* le32 */ |
|
||||
0x78, 0x56, 0x34, 0x12, |
|
||||
/* le64 */ |
|
||||
0xf0, 0xde, 0xbc, 0x9a, 0x78, 0x56, 0x34, 0x12, |
|
||||
/* be16 */ |
|
||||
0x12, 0x34, |
|
||||
/* be32 */ |
|
||||
0x12, 0x34, 0x56, 0x78, |
|
||||
/* be64 */ |
|
||||
0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 |
|
||||
}; |
|
||||
|
|
||||
int main(void) |
|
||||
{ |
|
||||
struct ripemd160 h, expected; |
|
||||
struct ripemd160_ctx ctx; |
|
||||
|
|
||||
/* This is how many tests you plan to run */ |
|
||||
plan_tests(1); |
|
||||
|
|
||||
ripemd160_init(&ctx); |
|
||||
ripemd160_u8(&ctx, 0x12); |
|
||||
ripemd160_u16(&ctx, 0x1234); |
|
||||
ripemd160_u32(&ctx, 0x12345678); |
|
||||
ripemd160_u64(&ctx, 0x123456789abcdef0ULL); |
|
||||
ripemd160_le16(&ctx, 0x1234); |
|
||||
ripemd160_le32(&ctx, 0x12345678); |
|
||||
ripemd160_le64(&ctx, 0x123456789abcdef0ULL); |
|
||||
ripemd160_be16(&ctx, 0x1234); |
|
||||
ripemd160_be32(&ctx, 0x12345678); |
|
||||
ripemd160_be64(&ctx, 0x123456789abcdef0ULL); |
|
||||
ripemd160_done(&ctx, &h); |
|
||||
|
|
||||
ripemd160(&expected, arr, sizeof(arr)); |
|
||||
ok1(memcmp(&h, &expected, sizeof(h)) == 0); |
|
||||
|
|
||||
/* This exits depending on whether all tests passed */ |
|
||||
return exit_status(); |
|
||||
} |
|
@ -1 +0,0 @@ |
|||||
../../../licenses/BSD-MIT |
|
@ -1,55 +0,0 @@ |
|||||
#include "config.h" |
|
||||
#include <stdio.h> |
|
||||
#include <string.h> |
|
||||
|
|
||||
/** |
|
||||
* crypto/sha256 - implementation of SHA-2 with 256 bit digest. |
|
||||
* |
|
||||
* This code is either a wrapper for openssl (if CCAN_CRYPTO_SHA256_USE_OPENSSL |
|
||||
* is defined) or an open-coded implementation based on Bitcoin's. |
|
||||
* |
|
||||
* License: BSD-MIT |
|
||||
* Maintainer: Rusty Russell <rusty@rustcorp.com.au> |
|
||||
* |
|
||||
* Example: |
|
||||
* #include <ccan/crypto/sha256/sha256.h> |
|
||||
* #include <err.h> |
|
||||
* #include <stdio.h> |
|
||||
* #include <string.h> |
|
||||
* |
|
||||
* // Simple demonstration: idential strings will have the same hash, but |
|
||||
* // two different strings will not. |
|
||||
* int main(int argc, char *argv[]) |
|
||||
* { |
|
||||
* struct sha256 hash1, hash2; |
|
||||
* |
|
||||
* if (argc != 3) |
|
||||
* errx(1, "Usage: %s <string1> <string2>", argv[0]); |
|
||||
* |
|
||||
* sha256(&hash1, argv[1], strlen(argv[1])); |
|
||||
* sha256(&hash2, argv[2], strlen(argv[2])); |
|
||||
* printf("Hash is %s\n", memcmp(&hash1, &hash2, sizeof(hash1)) |
|
||||
* ? "different" : "same"); |
|
||||
* return 0; |
|
||||
* } |
|
||||
*/ |
|
||||
int main(int argc, char *argv[]) |
|
||||
{ |
|
||||
/* Expect exactly one argument */ |
|
||||
if (argc != 2) |
|
||||
return 1; |
|
||||
|
|
||||
if (strcmp(argv[1], "depends") == 0) { |
|
||||
printf("ccan/endian\n"); |
|
||||
return 0; |
|
||||
} |
|
||||
|
|
||||
if (strcmp(argv[1], "libs") == 0) { |
|
||||
#ifdef CCAN_CRYPTO_SHA256_USE_OPENSSL |
|
||||
printf("crypto\n"); |
|
||||
#endif |
|
||||
return 0; |
|
||||
} |
|
||||
|
|
||||
return 1; |
|
||||
} |
|
@ -1,300 +0,0 @@ |
|||||
/* MIT (BSD) license - see LICENSE file for details */ |
|
||||
/* SHA256 core code translated from the Bitcoin project's C++:
|
|
||||
* |
|
||||
* src/crypto/sha256.cpp commit 417532c8acb93c36c2b6fd052b7c11b6a2906aa2 |
|
||||
* Copyright (c) 2014 The Bitcoin Core developers |
|
||||
* Distributed under the MIT software license, see the accompanying |
|
||||
* file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
||||
*/ |
|
||||
#include <ccan/crypto/sha256/sha256.h> |
|
||||
#include <ccan/endian/endian.h> |
|
||||
#include <ccan/compiler/compiler.h> |
|
||||
#include <stdbool.h> |
|
||||
#include <assert.h> |
|
||||
#include <string.h> |
|
||||
|
|
||||
static void invalidate_sha256(struct sha256_ctx *ctx) |
|
||||
{ |
|
||||
#ifdef CCAN_CRYPTO_SHA256_USE_OPENSSL |
|
||||
ctx->c.md_len = 0; |
|
||||
#else |
|
||||
ctx->bytes = (size_t)-1; |
|
||||
#endif |
|
||||
} |
|
||||
|
|
||||
static void check_sha256(struct sha256_ctx *ctx UNUSED) |
|
||||
{ |
|
||||
#ifdef CCAN_CRYPTO_SHA256_USE_OPENSSL |
|
||||
assert(ctx->c.md_len != 0); |
|
||||
#else |
|
||||
assert(ctx->bytes != (size_t)-1); |
|
||||
#endif |
|
||||
} |
|
||||
|
|
||||
#ifdef CCAN_CRYPTO_SHA256_USE_OPENSSL |
|
||||
void sha256_init(struct sha256_ctx *ctx) |
|
||||
{ |
|
||||
SHA256_Init(&ctx->c); |
|
||||
} |
|
||||
|
|
||||
void sha256_update(struct sha256_ctx *ctx, const void *p, size_t size) |
|
||||
{ |
|
||||
check_sha256(ctx); |
|
||||
SHA256_Update(&ctx->c, p, size); |
|
||||
} |
|
||||
|
|
||||
void sha256_done(struct sha256_ctx *ctx, struct sha256 *res) |
|
||||
{ |
|
||||
SHA256_Final(res->u.u8, &ctx->c); |
|
||||
invalidate_sha256(ctx); |
|
||||
} |
|
||||
#else |
|
||||
static uint32_t Ch(uint32_t x, uint32_t y, uint32_t z) |
|
||||
{ |
|
||||
return z ^ (x & (y ^ z)); |
|
||||
} |
|
||||
static uint32_t Maj(uint32_t x, uint32_t y, uint32_t z) |
|
||||
{ |
|
||||
return (x & y) | (z & (x | y)); |
|
||||
} |
|
||||
static uint32_t Sigma0(uint32_t x) |
|
||||
{ |
|
||||
return (x >> 2 | x << 30) ^ (x >> 13 | x << 19) ^ (x >> 22 | x << 10); |
|
||||
} |
|
||||
static uint32_t Sigma1(uint32_t x) |
|
||||
{ |
|
||||
return (x >> 6 | x << 26) ^ (x >> 11 | x << 21) ^ (x >> 25 | x << 7); |
|
||||
} |
|
||||
static uint32_t sigma0(uint32_t x) |
|
||||
{ |
|
||||
return (x >> 7 | x << 25) ^ (x >> 18 | x << 14) ^ (x >> 3); |
|
||||
} |
|
||||
static uint32_t sigma1(uint32_t x) |
|
||||
{ |
|
||||
return (x >> 17 | x << 15) ^ (x >> 19 | x << 13) ^ (x >> 10); |
|
||||
} |
|
||||
|
|
||||
/** One round of SHA-256. */ |
|
||||
static void Round(uint32_t a, uint32_t b, uint32_t c, uint32_t *d, uint32_t e, uint32_t f, uint32_t g, uint32_t *h, uint32_t k, uint32_t w) |
|
||||
{ |
|
||||
uint32_t t1 = *h + Sigma1(e) + Ch(e, f, g) + k + w; |
|
||||
uint32_t t2 = Sigma0(a) + Maj(a, b, c); |
|
||||
*d += t1; |
|
||||
*h = t1 + t2; |
|
||||
} |
|
||||
|
|
||||
/** Perform one SHA-256 transformation, processing a 64-byte chunk. */ |
|
||||
static void Transform(uint32_t *s, const uint32_t *chunk) |
|
||||
{ |
|
||||
uint32_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4], f = s[5], g = s[6], h = s[7]; |
|
||||
uint32_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15; |
|
||||
|
|
||||
Round(a, b, c, &d, e, f, g, &h, 0x428a2f98, w0 = be32_to_cpu(chunk[0])); |
|
||||
Round(h, a, b, &c, d, e, f, &g, 0x71374491, w1 = be32_to_cpu(chunk[1])); |
|
||||
Round(g, h, a, &b, c, d, e, &f, 0xb5c0fbcf, w2 = be32_to_cpu(chunk[2])); |
|
||||
Round(f, g, h, &a, b, c, d, &e, 0xe9b5dba5, w3 = be32_to_cpu(chunk[3])); |
|
||||
Round(e, f, g, &h, a, b, c, &d, 0x3956c25b, w4 = be32_to_cpu(chunk[4])); |
|
||||
Round(d, e, f, &g, h, a, b, &c, 0x59f111f1, w5 = be32_to_cpu(chunk[5])); |
|
||||
Round(c, d, e, &f, g, h, a, &b, 0x923f82a4, w6 = be32_to_cpu(chunk[6])); |
|
||||
Round(b, c, d, &e, f, g, h, &a, 0xab1c5ed5, w7 = be32_to_cpu(chunk[7])); |
|
||||
Round(a, b, c, &d, e, f, g, &h, 0xd807aa98, w8 = be32_to_cpu(chunk[8])); |
|
||||
Round(h, a, b, &c, d, e, f, &g, 0x12835b01, w9 = be32_to_cpu(chunk[9])); |
|
||||
Round(g, h, a, &b, c, d, e, &f, 0x243185be, w10 = be32_to_cpu(chunk[10])); |
|
||||
Round(f, g, h, &a, b, c, d, &e, 0x550c7dc3, w11 = be32_to_cpu(chunk[11])); |
|
||||
Round(e, f, g, &h, a, b, c, &d, 0x72be5d74, w12 = be32_to_cpu(chunk[12])); |
|
||||
Round(d, e, f, &g, h, a, b, &c, 0x80deb1fe, w13 = be32_to_cpu(chunk[13])); |
|
||||
Round(c, d, e, &f, g, h, a, &b, 0x9bdc06a7, w14 = be32_to_cpu(chunk[14])); |
|
||||
Round(b, c, d, &e, f, g, h, &a, 0xc19bf174, w15 = be32_to_cpu(chunk[15])); |
|
||||
|
|
||||
Round(a, b, c, &d, e, f, g, &h, 0xe49b69c1, w0 += sigma1(w14) + w9 + sigma0(w1)); |
|
||||
Round(h, a, b, &c, d, e, f, &g, 0xefbe4786, w1 += sigma1(w15) + w10 + sigma0(w2)); |
|
||||
Round(g, h, a, &b, c, d, e, &f, 0x0fc19dc6, w2 += sigma1(w0) + w11 + sigma0(w3)); |
|
||||
Round(f, g, h, &a, b, c, d, &e, 0x240ca1cc, w3 += sigma1(w1) + w12 + sigma0(w4)); |
|
||||
Round(e, f, g, &h, a, b, c, &d, 0x2de92c6f, w4 += sigma1(w2) + w13 + sigma0(w5)); |
|
||||
Round(d, e, f, &g, h, a, b, &c, 0x4a7484aa, w5 += sigma1(w3) + w14 + sigma0(w6)); |
|
||||
Round(c, d, e, &f, g, h, a, &b, 0x5cb0a9dc, w6 += sigma1(w4) + w15 + sigma0(w7)); |
|
||||
Round(b, c, d, &e, f, g, h, &a, 0x76f988da, w7 += sigma1(w5) + w0 + sigma0(w8)); |
|
||||
Round(a, b, c, &d, e, f, g, &h, 0x983e5152, w8 += sigma1(w6) + w1 + sigma0(w9)); |
|
||||
Round(h, a, b, &c, d, e, f, &g, 0xa831c66d, w9 += sigma1(w7) + w2 + sigma0(w10)); |
|
||||
Round(g, h, a, &b, c, d, e, &f, 0xb00327c8, w10 += sigma1(w8) + w3 + sigma0(w11)); |
|
||||
Round(f, g, h, &a, b, c, d, &e, 0xbf597fc7, w11 += sigma1(w9) + w4 + sigma0(w12)); |
|
||||
Round(e, f, g, &h, a, b, c, &d, 0xc6e00bf3, w12 += sigma1(w10) + w5 + sigma0(w13)); |
|
||||
Round(d, e, f, &g, h, a, b, &c, 0xd5a79147, w13 += sigma1(w11) + w6 + sigma0(w14)); |
|
||||
Round(c, d, e, &f, g, h, a, &b, 0x06ca6351, w14 += sigma1(w12) + w7 + sigma0(w15)); |
|
||||
Round(b, c, d, &e, f, g, h, &a, 0x14292967, w15 += sigma1(w13) + w8 + sigma0(w0)); |
|
||||
|
|
||||
Round(a, b, c, &d, e, f, g, &h, 0x27b70a85, w0 += sigma1(w14) + w9 + sigma0(w1)); |
|
||||
Round(h, a, b, &c, d, e, f, &g, 0x2e1b2138, w1 += sigma1(w15) + w10 + sigma0(w2)); |
|
||||
Round(g, h, a, &b, c, d, e, &f, 0x4d2c6dfc, w2 += sigma1(w0) + w11 + sigma0(w3)); |
|
||||
Round(f, g, h, &a, b, c, d, &e, 0x53380d13, w3 += sigma1(w1) + w12 + sigma0(w4)); |
|
||||
Round(e, f, g, &h, a, b, c, &d, 0x650a7354, w4 += sigma1(w2) + w13 + sigma0(w5)); |
|
||||
Round(d, e, f, &g, h, a, b, &c, 0x766a0abb, w5 += sigma1(w3) + w14 + sigma0(w6)); |
|
||||
Round(c, d, e, &f, g, h, a, &b, 0x81c2c92e, w6 += sigma1(w4) + w15 + sigma0(w7)); |
|
||||
Round(b, c, d, &e, f, g, h, &a, 0x92722c85, w7 += sigma1(w5) + w0 + sigma0(w8)); |
|
||||
Round(a, b, c, &d, e, f, g, &h, 0xa2bfe8a1, w8 += sigma1(w6) + w1 + sigma0(w9)); |
|
||||
Round(h, a, b, &c, d, e, f, &g, 0xa81a664b, w9 += sigma1(w7) + w2 + sigma0(w10)); |
|
||||
Round(g, h, a, &b, c, d, e, &f, 0xc24b8b70, w10 += sigma1(w8) + w3 + sigma0(w11)); |
|
||||
Round(f, g, h, &a, b, c, d, &e, 0xc76c51a3, w11 += sigma1(w9) + w4 + sigma0(w12)); |
|
||||
Round(e, f, g, &h, a, b, c, &d, 0xd192e819, w12 += sigma1(w10) + w5 + sigma0(w13)); |
|
||||
Round(d, e, f, &g, h, a, b, &c, 0xd6990624, w13 += sigma1(w11) + w6 + sigma0(w14)); |
|
||||
Round(c, d, e, &f, g, h, a, &b, 0xf40e3585, w14 += sigma1(w12) + w7 + sigma0(w15)); |
|
||||
Round(b, c, d, &e, f, g, h, &a, 0x106aa070, w15 += sigma1(w13) + w8 + sigma0(w0)); |
|
||||
|
|
||||
Round(a, b, c, &d, e, f, g, &h, 0x19a4c116, w0 += sigma1(w14) + w9 + sigma0(w1)); |
|
||||
Round(h, a, b, &c, d, e, f, &g, 0x1e376c08, w1 += sigma1(w15) + w10 + sigma0(w2)); |
|
||||
Round(g, h, a, &b, c, d, e, &f, 0x2748774c, w2 += sigma1(w0) + w11 + sigma0(w3)); |
|
||||
Round(f, g, h, &a, b, c, d, &e, 0x34b0bcb5, w3 += sigma1(w1) + w12 + sigma0(w4)); |
|
||||
Round(e, f, g, &h, a, b, c, &d, 0x391c0cb3, w4 += sigma1(w2) + w13 + sigma0(w5)); |
|
||||
Round(d, e, f, &g, h, a, b, &c, 0x4ed8aa4a, w5 += sigma1(w3) + w14 + sigma0(w6)); |
|
||||
Round(c, d, e, &f, g, h, a, &b, 0x5b9cca4f, w6 += sigma1(w4) + w15 + sigma0(w7)); |
|
||||
Round(b, c, d, &e, f, g, h, &a, 0x682e6ff3, w7 += sigma1(w5) + w0 + sigma0(w8)); |
|
||||
Round(a, b, c, &d, e, f, g, &h, 0x748f82ee, w8 += sigma1(w6) + w1 + sigma0(w9)); |
|
||||
Round(h, a, b, &c, d, e, f, &g, 0x78a5636f, w9 += sigma1(w7) + w2 + sigma0(w10)); |
|
||||
Round(g, h, a, &b, c, d, e, &f, 0x84c87814, w10 += sigma1(w8) + w3 + sigma0(w11)); |
|
||||
Round(f, g, h, &a, b, c, d, &e, 0x8cc70208, w11 += sigma1(w9) + w4 + sigma0(w12)); |
|
||||
Round(e, f, g, &h, a, b, c, &d, 0x90befffa, w12 += sigma1(w10) + w5 + sigma0(w13)); |
|
||||
Round(d, e, f, &g, h, a, b, &c, 0xa4506ceb, w13 += sigma1(w11) + w6 + sigma0(w14)); |
|
||||
Round(c, d, e, &f, g, h, a, &b, 0xbef9a3f7, w14 + sigma1(w12) + w7 + sigma0(w15)); |
|
||||
Round(b, c, d, &e, f, g, h, &a, 0xc67178f2, w15 + sigma1(w13) + w8 + sigma0(w0)); |
|
||||
|
|
||||
s[0] += a; |
|
||||
s[1] += b; |
|
||||
s[2] += c; |
|
||||
s[3] += d; |
|
||||
s[4] += e; |
|
||||
s[5] += f; |
|
||||
s[6] += g; |
|
||||
s[7] += h; |
|
||||
} |
|
||||
|
|
||||
static void add(struct sha256_ctx *ctx, const void *p, size_t len) |
|
||||
{ |
|
||||
const unsigned char *data = p; |
|
||||
size_t bufsize = ctx->bytes % 64; |
|
||||
|
|
||||
if (bufsize + len >= 64) { |
|
||||
/* Fill the buffer, and process it. */ |
|
||||
memcpy(ctx->buf.u8 + bufsize, data, 64 - bufsize); |
|
||||
ctx->bytes += 64 - bufsize; |
|
||||
data += 64 - bufsize; |
|
||||
len -= 64 - bufsize; |
|
||||
Transform(ctx->s, ctx->buf.u32); |
|
||||
bufsize = 0; |
|
||||
} |
|
||||
|
|
||||
while (len >= 64) { |
|
||||
/* Process full chunks directly from the source. */ |
|
||||
if (alignment_ok(data, sizeof(uint32_t))) |
|
||||
Transform(ctx->s, (const uint32_t *)data); |
|
||||
else { |
|
||||
memcpy(ctx->buf.u8, data, sizeof(ctx->buf)); |
|
||||
Transform(ctx->s, ctx->buf.u32); |
|
||||
} |
|
||||
ctx->bytes += 64; |
|
||||
data += 64; |
|
||||
len -= 64; |
|
||||
} |
|
||||
|
|
||||
if (len) { |
|
||||
/* Fill the buffer with what remains. */ |
|
||||
memcpy(ctx->buf.u8 + bufsize, data, len); |
|
||||
ctx->bytes += len; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
void sha256_init(struct sha256_ctx *ctx) |
|
||||
{ |
|
||||
struct sha256_ctx init = SHA256_INIT; |
|
||||
*ctx = init; |
|
||||
} |
|
||||
|
|
||||
void sha256_update(struct sha256_ctx *ctx, const void *p, size_t size) |
|
||||
{ |
|
||||
check_sha256(ctx); |
|
||||
add(ctx, p, size); |
|
||||
} |
|
||||
|
|
||||
void sha256_done(struct sha256_ctx *ctx, struct sha256 *res) |
|
||||
{ |
|
||||
static const unsigned char pad[64] = {0x80}; |
|
||||
uint64_t sizedesc; |
|
||||
size_t i; |
|
||||
|
|
||||
sizedesc = cpu_to_be64((uint64_t)ctx->bytes << 3); |
|
||||
/* Add '1' bit to terminate, then all 0 bits, up to next block - 8. */ |
|
||||
add(ctx, pad, 1 + ((128 - 8 - (ctx->bytes % 64) - 1) % 64)); |
|
||||
/* Add number of bits of data (big endian) */ |
|
||||
add(ctx, &sizedesc, 8); |
|
||||
for (i = 0; i < sizeof(ctx->s) / sizeof(ctx->s[0]); i++) |
|
||||
res->u.u32[i] = cpu_to_be32(ctx->s[i]); |
|
||||
invalidate_sha256(ctx); |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
void sha256(struct sha256 *sha, const void *p, size_t size) |
|
||||
{ |
|
||||
struct sha256_ctx ctx; |
|
||||
|
|
||||
sha256_init(&ctx); |
|
||||
sha256_update(&ctx, p, size); |
|
||||
sha256_done(&ctx, sha); |
|
||||
CCAN_CLEAR_MEMORY(&ctx, sizeof(ctx)); |
|
||||
} |
|
||||
|
|
||||
void sha256_u8(struct sha256_ctx *ctx, uint8_t v) |
|
||||
{ |
|
||||
sha256_update(ctx, &v, sizeof(v)); |
|
||||
} |
|
||||
|
|
||||
void sha256_u16(struct sha256_ctx *ctx, uint16_t v) |
|
||||
{ |
|
||||
sha256_update(ctx, &v, sizeof(v)); |
|
||||
} |
|
||||
|
|
||||
void sha256_u32(struct sha256_ctx *ctx, uint32_t v) |
|
||||
{ |
|
||||
sha256_update(ctx, &v, sizeof(v)); |
|
||||
} |
|
||||
|
|
||||
void sha256_u64(struct sha256_ctx *ctx, uint64_t v) |
|
||||
{ |
|
||||
sha256_update(ctx, &v, sizeof(v)); |
|
||||
} |
|
||||
|
|
||||
/* Add as little-endian */ |
|
||||
void sha256_le16(struct sha256_ctx *ctx, uint16_t v) |
|
||||
{ |
|
||||
leint16_t lev = cpu_to_le16(v); |
|
||||
sha256_update(ctx, &lev, sizeof(lev)); |
|
||||
} |
|
||||
|
|
||||
void sha256_le32(struct sha256_ctx *ctx, uint32_t v) |
|
||||
{ |
|
||||
leint32_t lev = cpu_to_le32(v); |
|
||||
sha256_update(ctx, &lev, sizeof(lev)); |
|
||||
} |
|
||||
|
|
||||
void sha256_le64(struct sha256_ctx *ctx, uint64_t v) |
|
||||
{ |
|
||||
leint64_t lev = cpu_to_le64(v); |
|
||||
sha256_update(ctx, &lev, sizeof(lev)); |
|
||||
} |
|
||||
|
|
||||
/* Add as big-endian */ |
|
||||
void sha256_be16(struct sha256_ctx *ctx, uint16_t v) |
|
||||
{ |
|
||||
beint16_t bev = cpu_to_be16(v); |
|
||||
sha256_update(ctx, &bev, sizeof(bev)); |
|
||||
} |
|
||||
|
|
||||
void sha256_be32(struct sha256_ctx *ctx, uint32_t v) |
|
||||
{ |
|
||||
beint32_t bev = cpu_to_be32(v); |
|
||||
sha256_update(ctx, &bev, sizeof(bev)); |
|
||||
} |
|
||||
|
|
||||
void sha256_be64(struct sha256_ctx *ctx, uint64_t v) |
|
||||
{ |
|
||||
beint64_t bev = cpu_to_be64(v); |
|
||||
sha256_update(ctx, &bev, sizeof(bev)); |
|
||||
} |
|
@ -1,147 +0,0 @@ |
|||||
#ifndef CCAN_CRYPTO_SHA256_H |
|
||||
#define CCAN_CRYPTO_SHA256_H |
|
||||
/* BSD-MIT - see LICENSE file for details */ |
|
||||
#include "config.h" |
|
||||
#include <stdint.h> |
|
||||
#include <stdlib.h> |
|
||||
|
|
||||
/* Uncomment this to use openssl's SHA256 routines (and link with -lcrypto) */ |
|
||||
/*#define CCAN_CRYPTO_SHA256_USE_OPENSSL 1*/ |
|
||||
|
|
||||
#ifdef CCAN_CRYPTO_SHA256_USE_OPENSSL |
|
||||
#include <openssl/sha.h> |
|
||||
#endif |
|
||||
|
|
||||
/**
|
|
||||
* struct sha256 - structure representing a completed SHA256. |
|
||||
* @u.u8: an unsigned char array. |
|
||||
* @u.u32: a 32-bit integer array. |
|
||||
* |
|
||||
* Other fields may be added to the union in future. |
|
||||
*/ |
|
||||
struct sha256 { |
|
||||
union { |
|
||||
uint32_t u32[8]; |
|
||||
unsigned char u8[32]; |
|
||||
} u; |
|
||||
}; |
|
||||
|
|
||||
/**
|
|
||||
* sha256 - return sha256 of an object. |
|
||||
* @sha256: the sha256 to fill in |
|
||||
* @p: pointer to memory, |
|
||||
* @size: the number of bytes pointed to by @p |
|
||||
* |
|
||||
* The bytes pointed to by @p is SHA256 hashed into @sha256. This is |
|
||||
* equivalent to sha256_init(), sha256_update() then sha256_done(). |
|
||||
*/ |
|
||||
void sha256(struct sha256 *sha, const void *p, size_t size); |
|
||||
|
|
||||
/**
|
|
||||
* struct sha256_ctx - structure to store running context for sha256 |
|
||||
*/ |
|
||||
struct sha256_ctx { |
|
||||
#ifdef CCAN_CRYPTO_SHA256_USE_OPENSSL |
|
||||
SHA256_CTX c; |
|
||||
#else |
|
||||
uint32_t s[8]; |
|
||||
union { |
|
||||
uint32_t u32[16]; |
|
||||
unsigned char u8[64]; |
|
||||
} buf; |
|
||||
size_t bytes; |
|
||||
#endif |
|
||||
}; |
|
||||
|
|
||||
/**
|
|
||||
* sha256_init - initialize an SHA256 context. |
|
||||
* @ctx: the sha256_ctx to initialize |
|
||||
* |
|
||||
* This must be called before sha256_update or sha256_done, or |
|
||||
* alternately you can assign SHA256_INIT. |
|
||||
* |
|
||||
* If it was already initialized, this forgets anything which was |
|
||||
* hashed before. |
|
||||
* |
|
||||
* Example: |
|
||||
* static void hash_all(const char **arr, struct sha256 *hash) |
|
||||
* { |
|
||||
* size_t i; |
|
||||
* struct sha256_ctx ctx; |
|
||||
* |
|
||||
* sha256_init(&ctx); |
|
||||
* for (i = 0; arr[i]; i++) |
|
||||
* sha256_update(&ctx, arr[i], strlen(arr[i])); |
|
||||
* sha256_done(&ctx, hash); |
|
||||
* } |
|
||||
*/ |
|
||||
void sha256_init(struct sha256_ctx *ctx); |
|
||||
|
|
||||
/**
|
|
||||
* SHA256_INIT - initializer for an SHA256 context. |
|
||||
* |
|
||||
* This can be used to staticly initialize an SHA256 context (instead |
|
||||
* of sha256_init()). |
|
||||
* |
|
||||
* Example: |
|
||||
* static void hash_all(const char **arr, struct sha256 *hash) |
|
||||
* { |
|
||||
* size_t i; |
|
||||
* struct sha256_ctx ctx = SHA256_INIT; |
|
||||
* |
|
||||
* for (i = 0; arr[i]; i++) |
|
||||
* sha256_update(&ctx, arr[i], strlen(arr[i])); |
|
||||
* sha256_done(&ctx, hash); |
|
||||
* } |
|
||||
*/ |
|
||||
#ifdef CCAN_CRYPTO_SHA256_USE_OPENSSL |
|
||||
#define SHA256_INIT \ |
|
||||
{ { { 0x6a09e667ul, 0xbb67ae85ul, 0x3c6ef372ul, 0xa54ff53aul, \ |
|
||||
0x510e527ful, 0x9b05688cul, 0x1f83d9abul, 0x5be0cd19ul }, \ |
|
||||
0x0, 0x0, \ |
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, \ |
|
||||
0x0, 0x20 } } |
|
||||
#else |
|
||||
#define SHA256_INIT \ |
|
||||
{ { 0x6a09e667ul, 0xbb67ae85ul, 0x3c6ef372ul, 0xa54ff53aul, \ |
|
||||
0x510e527ful, 0x9b05688cul, 0x1f83d9abul, 0x5be0cd19ul }, \ |
|
||||
{ { 0 } }, 0 } |
|
||||
#endif |
|
||||
|
|
||||
/**
|
|
||||
* sha256_update - include some memory in the hash. |
|
||||
* @ctx: the sha256_ctx to use |
|
||||
* @p: pointer to memory, |
|
||||
* @size: the number of bytes pointed to by @p |
|
||||
* |
|
||||
* You can call this multiple times to hash more data, before calling |
|
||||
* sha256_done(). |
|
||||
*/ |
|
||||
void sha256_update(struct sha256_ctx *ctx, const void *p, size_t size); |
|
||||
|
|
||||
/**
|
|
||||
* sha256_done - finish SHA256 and return the hash |
|
||||
* @ctx: the sha256_ctx to complete |
|
||||
* @res: the hash to return. |
|
||||
* |
|
||||
* Note that @ctx is *destroyed* by this, and must be reinitialized. |
|
||||
* To avoid that, pass a copy instead. |
|
||||
*/ |
|
||||
void sha256_done(struct sha256_ctx *sha256, struct sha256 *res); |
|
||||
|
|
||||
/* Add various types to an SHA256 hash */ |
|
||||
void sha256_u8(struct sha256_ctx *ctx, uint8_t v); |
|
||||
void sha256_u16(struct sha256_ctx *ctx, uint16_t v); |
|
||||
void sha256_u32(struct sha256_ctx *ctx, uint32_t v); |
|
||||
void sha256_u64(struct sha256_ctx *ctx, uint64_t v); |
|
||||
|
|
||||
/* Add as little-endian */ |
|
||||
void sha256_le16(struct sha256_ctx *ctx, uint16_t v); |
|
||||
void sha256_le32(struct sha256_ctx *ctx, uint32_t v); |
|
||||
void sha256_le64(struct sha256_ctx *ctx, uint64_t v); |
|
||||
|
|
||||
/* Add as big-endian */ |
|
||||
void sha256_be16(struct sha256_ctx *ctx, uint16_t v); |
|
||||
void sha256_be32(struct sha256_ctx *ctx, uint32_t v); |
|
||||
void sha256_be64(struct sha256_ctx *ctx, uint64_t v); |
|
||||
#endif /* CCAN_CRYPTO_SHA256_H */ |
|
@ -1,54 +0,0 @@ |
|||||
#include <ccan/crypto/sha256/sha256.h> |
|
||||
/* Include the C files directly. */ |
|
||||
#include <ccan/crypto/sha256/sha256.c> |
|
||||
#include <ccan/tap/tap.h> |
|
||||
#include <stdio.h> |
|
||||
|
|
||||
/* This is the test introduced for SHA-3, which checks for 33-bit overflow:
|
|
||||
"abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmno" |
|
||||
16777216 times. |
|
||||
*/ |
|
||||
static uint32_t expected[] = { |
|
||||
CPU_TO_BE32(0x50e72a0e), CPU_TO_BE32(0x26442fe2), |
|
||||
CPU_TO_BE32(0x552dc393), CPU_TO_BE32(0x8ac58658), |
|
||||
CPU_TO_BE32(0x228c0cbf), CPU_TO_BE32(0xb1d2ca87), |
|
||||
CPU_TO_BE32(0x2ae43526), CPU_TO_BE32(0x6fcd055e) |
|
||||
}; |
|
||||
|
|
||||
/* Produced by actually running the code on x86. */ |
|
||||
static const struct sha256_ctx after_16M_by_64 = { |
|
||||
#ifdef CCAN_CRYPTO_SHA256_USE_OPENSSL |
|
||||
{ { LE32_TO_CPU(0x515e3215), LE32_TO_CPU(0x592f4ae0), |
|
||||
LE32_TO_CPU(0xd407a8fc), LE32_TO_CPU(0x1fad409b), |
|
||||
LE32_TO_CPU(0x51fa46cc), LE32_TO_CPU(0xea528ae5), |
|
||||
LE32_TO_CPU(0x5fa58ebb), LE32_TO_CPU(0x8be97931) }, |
|
||||
0x0, 0x2, |
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, |
|
||||
0x0, 0x20 } |
|
||||
#else |
|
||||
{ LE32_TO_CPU(0x515e3215), LE32_TO_CPU(0x592f4ae0), |
|
||||
LE32_TO_CPU(0xd407a8fc), LE32_TO_CPU(0x1fad409b), |
|
||||
LE32_TO_CPU(0x51fa46cc), LE32_TO_CPU(0xea528ae5), |
|
||||
LE32_TO_CPU(0x5fa58ebb), LE32_TO_CPU(0x8be97931) }, |
|
||||
1073741824, |
|
||||
{ .u32 = { 0x64636261, 0x68676665, 0x65646362, 0x69686766, |
|
||||
0x66656463, 0x6a696867, 0x67666564, 0x6b6a6968 } } |
|
||||
#endif |
|
||||
}; |
|
||||
|
|
||||
int main(void) |
|
||||
{ |
|
||||
struct sha256 h; |
|
||||
struct sha256_ctx ctx; |
|
||||
|
|
||||
/* This is how many tests you plan to run */ |
|
||||
plan_tests(1); |
|
||||
|
|
||||
ctx = after_16M_by_64; |
|
||||
sha256_done(&ctx, &h); |
|
||||
|
|
||||
ok1(memcmp(&h.u, expected, sizeof(expected)) == 0); |
|
||||
|
|
||||
/* This exits depending on whether all tests passed */ |
|
||||
return exit_status(); |
|
||||
} |
|
@ -1,23 +0,0 @@ |
|||||
#include <ccan/crypto/sha256/sha256.h> |
|
||||
/* Include the C files directly. */ |
|
||||
#include <ccan/crypto/sha256/sha256.c> |
|
||||
#include <ccan/tap/tap.h> |
|
||||
|
|
||||
int main(void) |
|
||||
{ |
|
||||
struct sha256 h, expected; |
|
||||
static const char zeroes[1000]; |
|
||||
size_t i; |
|
||||
|
|
||||
plan_tests(63); |
|
||||
|
|
||||
/* Test different alignments. */ |
|
||||
sha256(&expected, zeroes, sizeof(zeroes) - 64); |
|
||||
for (i = 1; i < 64; i++) { |
|
||||
sha256(&h, zeroes + i, sizeof(zeroes) - 64); |
|
||||
ok1(memcmp(&h, &expected, sizeof(h)) == 0); |
|
||||
} |
|
||||
|
|
||||
/* This exits depending on whether all tests passed */ |
|
||||
return exit_status(); |
|
||||
} |
|
@ -1,83 +0,0 @@ |
|||||
#include <ccan/crypto/sha256/sha256.h> |
|
||||
/* Include the C files directly. */ |
|
||||
#include <ccan/crypto/sha256/sha256.c> |
|
||||
#include <ccan/tap/tap.h> |
|
||||
|
|
||||
/* Test vectors. */ |
|
||||
struct test { |
|
||||
const char *test; |
|
||||
size_t repetitions; |
|
||||
beint32_t result[8]; |
|
||||
}; |
|
||||
|
|
||||
static struct test tests[] = { |
|
||||
{ "", 1, |
|
||||
{ CPU_TO_BE32(0xe3b0c442), CPU_TO_BE32(0x98fc1c14), |
|
||||
CPU_TO_BE32(0x9afbf4c8), CPU_TO_BE32(0x996fb924), |
|
||||
CPU_TO_BE32(0x27ae41e4), CPU_TO_BE32(0x649b934c), |
|
||||
CPU_TO_BE32(0xa495991b), CPU_TO_BE32(0x7852b855) } }, |
|
||||
{ "abc", 1, |
|
||||
{ CPU_TO_BE32(0xba7816bf), CPU_TO_BE32(0x8f01cfea), |
|
||||
CPU_TO_BE32(0x414140de), CPU_TO_BE32(0x5dae2223), |
|
||||
CPU_TO_BE32(0xb00361a3), CPU_TO_BE32(0x96177a9c), |
|
||||
CPU_TO_BE32(0xb410ff61), CPU_TO_BE32(0xf20015ad) } }, |
|
||||
{ "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", 1, |
|
||||
{ CPU_TO_BE32(0x248d6a61), CPU_TO_BE32(0xd20638b8), |
|
||||
CPU_TO_BE32(0xe5c02693), CPU_TO_BE32(0x0c3e6039), |
|
||||
CPU_TO_BE32(0xa33ce459), CPU_TO_BE32(0x64ff2167), |
|
||||
CPU_TO_BE32(0xf6ecedd4), CPU_TO_BE32(0x19db06c1) } }, |
|
||||
{ "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", 1, |
|
||||
{ CPU_TO_BE32(0xcf5b16a7), CPU_TO_BE32(0x78af8380), |
|
||||
CPU_TO_BE32(0x036ce59e), CPU_TO_BE32(0x7b049237), |
|
||||
CPU_TO_BE32(0x0b249b11), CPU_TO_BE32(0xe8f07a51), |
|
||||
CPU_TO_BE32(0xafac4503), CPU_TO_BE32(0x7afee9d1) } }, |
|
||||
{ "a", 1000000, |
|
||||
{ CPU_TO_BE32(0xcdc76e5c), CPU_TO_BE32(0x9914fb92), |
|
||||
CPU_TO_BE32(0x81a1c7e2), CPU_TO_BE32(0x84d73e67), |
|
||||
CPU_TO_BE32(0xf1809a48), CPU_TO_BE32(0xa497200e), |
|
||||
CPU_TO_BE32(0x046d39cc), CPU_TO_BE32(0xc7112cd0) } } |
|
||||
#if 0 /* Good test, but takes ages! */
|
|
||||
, { "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmno", 16777216, |
|
||||
{ CPU_TO_BE32(0x50e72a0e), CPU_TO_BE32(0x26442fe2), |
|
||||
CPU_TO_BE32(0x552dc393), CPU_TO_BE32(0x8ac58658), |
|
||||
CPU_TO_BE32(0x228c0cbf), CPU_TO_BE32(0xb1d2ca87), |
|
||||
CPU_TO_BE32(0x2ae43526), CPU_TO_BE32(0x6fcd055e) } } |
|
||||
#endif |
|
||||
}; |
|
||||
|
|
||||
static bool do_test(const struct test *t, bool single) |
|
||||
{ |
|
||||
struct sha256 h; |
|
||||
|
|
||||
if (single) { |
|
||||
if (t->repetitions != 1) |
|
||||
return true; |
|
||||
sha256(&h, t->test, strlen(t->test)); |
|
||||
} else { |
|
||||
struct sha256_ctx ctx = SHA256_INIT; |
|
||||
size_t i; |
|
||||
|
|
||||
for (i = 0; i < t->repetitions; i++) |
|
||||
sha256_update(&ctx, t->test, strlen(t->test)); |
|
||||
sha256_done(&ctx, &h); |
|
||||
} |
|
||||
|
|
||||
return memcmp(&h.u, t->result, sizeof(t->result)) == 0; |
|
||||
} |
|
||||
|
|
||||
int main(void) |
|
||||
{ |
|
||||
size_t i; |
|
||||
|
|
||||
/* This is how many tests you plan to run */ |
|
||||
plan_tests(sizeof(tests) / sizeof(struct test) * 2); |
|
||||
|
|
||||
for (i = 0; i < sizeof(tests) / sizeof(struct test); i++) |
|
||||
ok1(do_test(&tests[i], false)); |
|
||||
|
|
||||
for (i = 0; i < sizeof(tests) / sizeof(struct test); i++) |
|
||||
ok1(do_test(&tests[i], true)); |
|
||||
|
|
||||
/* This exits depending on whether all tests passed */ |
|
||||
return exit_status(); |
|
||||
} |
|
@ -1,63 +0,0 @@ |
|||||
#include <ccan/crypto/sha256/sha256.h> |
|
||||
/* Include the C files directly. */ |
|
||||
#include <ccan/crypto/sha256/sha256.c> |
|
||||
#include <ccan/tap/tap.h> |
|
||||
|
|
||||
static unsigned char arr[] = { |
|
||||
0x12, |
|
||||
#if HAVE_BIG_ENDIAN |
|
||||
/* u16 */ |
|
||||
0x12, 0x34, |
|
||||
/* u32 */ |
|
||||
0x12, 0x34, 0x56, 0x78, |
|
||||
/* u64 */ |
|
||||
0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0, |
|
||||
#else |
|
||||
/* u16 */ |
|
||||
0x34, 0x12, |
|
||||
/* u32 */ |
|
||||
0x78, 0x56, 0x34, 0x12, |
|
||||
/* u64 */ |
|
||||
0xf0, 0xde, 0xbc, 0x9a, 0x78, 0x56, 0x34, 0x12, |
|
||||
#endif |
|
||||
/* le16 */ |
|
||||
0x34, 0x12, |
|
||||
/* le32 */ |
|
||||
0x78, 0x56, 0x34, 0x12, |
|
||||
/* le64 */ |
|
||||
0xf0, 0xde, 0xbc, 0x9a, 0x78, 0x56, 0x34, 0x12, |
|
||||
/* be16 */ |
|
||||
0x12, 0x34, |
|
||||
/* be32 */ |
|
||||
0x12, 0x34, 0x56, 0x78, |
|
||||
/* be64 */ |
|
||||
0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 |
|
||||
}; |
|
||||
|
|
||||
int main(void) |
|
||||
{ |
|
||||
struct sha256 h, expected; |
|
||||
struct sha256_ctx ctx; |
|
||||
|
|
||||
/* This is how many tests you plan to run */ |
|
||||
plan_tests(1); |
|
||||
|
|
||||
sha256_init(&ctx); |
|
||||
sha256_u8(&ctx, 0x12); |
|
||||
sha256_u16(&ctx, 0x1234); |
|
||||
sha256_u32(&ctx, 0x12345678); |
|
||||
sha256_u64(&ctx, 0x123456789abcdef0ULL); |
|
||||
sha256_le16(&ctx, 0x1234); |
|
||||
sha256_le32(&ctx, 0x12345678); |
|
||||
sha256_le64(&ctx, 0x123456789abcdef0ULL); |
|
||||
sha256_be16(&ctx, 0x1234); |
|
||||
sha256_be32(&ctx, 0x12345678); |
|
||||
sha256_be64(&ctx, 0x123456789abcdef0ULL); |
|
||||
sha256_done(&ctx, &h); |
|
||||
|
|
||||
sha256(&expected, arr, sizeof(arr)); |
|
||||
ok1(memcmp(&h, &expected, sizeof(h)) == 0); |
|
||||
|
|
||||
/* This exits depending on whether all tests passed */ |
|
||||
return exit_status(); |
|
||||
} |
|
@ -1 +0,0 @@ |
|||||
../../../licenses/BSD-MIT |
|
@ -1,55 +0,0 @@ |
|||||
#include "config.h" |
|
||||
#include <stdio.h> |
|
||||
#include <string.h> |
|
||||
|
|
||||
/** |
|
||||
* crypto/sha512 - implementation of SHA-2 with 512 bit digest. |
|
||||
* |
|
||||
* This code is either a wrapper for openssl (if CCAN_CRYPTO_SHA512_USE_OPENSSL |
|
||||
* is defined) or an open-coded implementation based on Bitcoin's. |
|
||||
* |
|
||||
* License: BSD-MIT |
|
||||
* Maintainer: Rusty Russell <rusty@rustcorp.com.au> |
|
||||
* |
|
||||
* Example: |
|
||||
* #include <ccan/crypto/sha512/sha512.h> |
|
||||
* #include <err.h> |
|
||||
* #include <stdio.h> |
|
||||
* #include <string.h> |
|
||||
* |
|
||||
* // Simple demonstration: idential strings will have the same hash, but |
|
||||
* // two different strings will not. |
|
||||
* int main(int argc, char *argv[]) |
|
||||
* { |
|
||||
* struct sha512 hash1, hash2; |
|
||||
* |
|
||||
* if (argc != 3) |
|
||||
* errx(1, "Usage: %s <string1> <string2>", argv[0]); |
|
||||
* |
|
||||
* sha512(&hash1, argv[1], strlen(argv[1])); |
|
||||
* sha512(&hash2, argv[2], strlen(argv[2])); |
|
||||
* printf("Hash is %s\n", memcmp(&hash1, &hash2, sizeof(hash1)) |
|
||||
* ? "different" : "same"); |
|
||||
* return 0; |
|
||||
* } |
|
||||
*/ |
|
||||
int main(int argc, char *argv[]) |
|
||||
{ |
|
||||
/* Expect exactly one argument */ |
|
||||
if (argc != 2) |
|
||||
return 1; |
|
||||
|
|
||||
if (strcmp(argv[1], "depends") == 0) { |
|
||||
printf("ccan/endian\n"); |
|
||||
return 0; |
|
||||
} |
|
||||
|
|
||||
if (strcmp(argv[1], "libs") == 0) { |
|
||||
#ifdef CCAN_CRYPTO_SHA512_USE_OPENSSL |
|
||||
printf("crypto\n"); |
|
||||
#endif |
|
||||
return 0; |
|
||||
} |
|
||||
|
|
||||
return 1; |
|
||||
} |
|
@ -1,260 +0,0 @@ |
|||||
/* MIT (BSD) license - see LICENSE file for details */ |
|
||||
/* SHA512 core code translated from the Bitcoin project's C++:
|
|
||||
* |
|
||||
* src/crypto/sha512.cpp commit f914f1a746d7f91951c1da262a4a749dd3ebfa71 |
|
||||
* Copyright (c) 2014 The Bitcoin Core developers |
|
||||
* Distributed under the MIT software license, see the accompanying |
|
||||
* file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
||||
*/ |
|
||||
#include <ccan/crypto/sha512/sha512.h> |
|
||||
#include <ccan/endian/endian.h> |
|
||||
#include <ccan/compiler/compiler.h> |
|
||||
#include <stdbool.h> |
|
||||
#include <assert.h> |
|
||||
#include <string.h> |
|
||||
|
|
||||
static void invalidate_sha512(struct sha512_ctx *ctx) |
|
||||
{ |
|
||||
#ifdef CCAN_CRYPTO_SHA512_USE_OPENSSL |
|
||||
ctx->c.md_len = 0; |
|
||||
#else |
|
||||
ctx->bytes = (size_t)-1; |
|
||||
#endif |
|
||||
} |
|
||||
|
|
||||
static void check_sha512(struct sha512_ctx *ctx UNUSED) |
|
||||
{ |
|
||||
#ifdef CCAN_CRYPTO_SHA512_USE_OPENSSL |
|
||||
assert(ctx->c.md_len != 0); |
|
||||
#else |
|
||||
assert(ctx->bytes != (size_t)-1); |
|
||||
#endif |
|
||||
} |
|
||||
|
|
||||
#ifdef CCAN_CRYPTO_SHA512_USE_OPENSSL |
|
||||
void sha512_init(struct sha512_ctx *ctx) |
|
||||
{ |
|
||||
SHA512_Init(&ctx->c); |
|
||||
} |
|
||||
|
|
||||
void sha512_update(struct sha512_ctx *ctx, const void *p, size_t size) |
|
||||
{ |
|
||||
check_sha512(ctx); |
|
||||
SHA512_Update(&ctx->c, p, size); |
|
||||
} |
|
||||
|
|
||||
void sha512_done(struct sha512_ctx *ctx, struct sha512 *res) |
|
||||
{ |
|
||||
SHA512_Final(res->u.u8, &ctx->c); |
|
||||
invalidate_sha512(ctx); |
|
||||
} |
|
||||
#else |
|
||||
static uint64_t Ch(uint64_t x, uint64_t y, uint64_t z) |
|
||||
{ |
|
||||
return z ^ (x & (y ^ z)); |
|
||||
} |
|
||||
static uint64_t Maj(uint64_t x, uint64_t y, uint64_t z) |
|
||||
{ |
|
||||
return (x & y) | (z & (x | y)); |
|
||||
} |
|
||||
static uint64_t Sigma0(uint64_t x) |
|
||||
{ |
|
||||
return (x >> 28 | x << 36) ^ (x >> 34 | x << 30) ^ (x >> 39 | x << 25); |
|
||||
} |
|
||||
static uint64_t Sigma1(uint64_t x) |
|
||||
{ |
|
||||
return (x >> 14 | x << 50) ^ (x >> 18 | x << 46) ^ (x >> 41 | x << 23); |
|
||||
} |
|
||||
static uint64_t sigma0(uint64_t x) |
|
||||
{ |
|
||||
return (x >> 1 | x << 63) ^ (x >> 8 | x << 56) ^ (x >> 7); |
|
||||
} |
|
||||
static uint64_t sigma1(uint64_t x) |
|
||||
{ |
|
||||
return (x >> 19 | x << 45) ^ (x >> 61 | x << 3) ^ (x >> 6); |
|
||||
} |
|
||||
|
|
||||
/** One round of SHA-512. */ |
|
||||
static void Round(uint64_t a, uint64_t b, uint64_t c, uint64_t *d, uint64_t e, uint64_t f, uint64_t g, uint64_t *h, uint64_t k, uint64_t w) |
|
||||
{ |
|
||||
uint64_t t1 = *h + Sigma1(e) + Ch(e, f, g) + k + w; |
|
||||
uint64_t t2 = Sigma0(a) + Maj(a, b, c); |
|
||||
*d += t1; |
|
||||
*h = t1 + t2; |
|
||||
} |
|
||||
|
|
||||
/** Perform one SHA-512 transformation, processing a 128-byte chunk. */ |
|
||||
static void Transform(uint64_t *s, const uint64_t *chunk) |
|
||||
{ |
|
||||
uint64_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4], f = s[5], g = s[6], h = s[7]; |
|
||||
uint64_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15; |
|
||||
|
|
||||
Round(a, b, c, &d, e, f, g, &h, 0x428a2f98d728ae22ull, w0 = be64_to_cpu(chunk[0])); |
|
||||
Round(h, a, b, &c, d, e, f, &g, 0x7137449123ef65cdull, w1 = be64_to_cpu(chunk[1])); |
|
||||
Round(g, h, a, &b, c, d, e, &f, 0xb5c0fbcfec4d3b2full, w2 = be64_to_cpu(chunk[2])); |
|
||||
Round(f, g, h, &a, b, c, d, &e, 0xe9b5dba58189dbbcull, w3 = be64_to_cpu(chunk[3])); |
|
||||
Round(e, f, g, &h, a, b, c, &d, 0x3956c25bf348b538ull, w4 = be64_to_cpu(chunk[4])); |
|
||||
Round(d, e, f, &g, h, a, b, &c, 0x59f111f1b605d019ull, w5 = be64_to_cpu(chunk[5])); |
|
||||
Round(c, d, e, &f, g, h, a, &b, 0x923f82a4af194f9bull, w6 = be64_to_cpu(chunk[6])); |
|
||||
Round(b, c, d, &e, f, g, h, &a, 0xab1c5ed5da6d8118ull, w7 = be64_to_cpu(chunk[7])); |
|
||||
Round(a, b, c, &d, e, f, g, &h, 0xd807aa98a3030242ull, w8 = be64_to_cpu(chunk[8])); |
|
||||
Round(h, a, b, &c, d, e, f, &g, 0x12835b0145706fbeull, w9 = be64_to_cpu(chunk[9])); |
|
||||
Round(g, h, a, &b, c, d, e, &f, 0x243185be4ee4b28cull, w10 = be64_to_cpu(chunk[10])); |
|
||||
Round(f, g, h, &a, b, c, d, &e, 0x550c7dc3d5ffb4e2ull, w11 = be64_to_cpu(chunk[11])); |
|
||||
Round(e, f, g, &h, a, b, c, &d, 0x72be5d74f27b896full, w12 = be64_to_cpu(chunk[12])); |
|
||||
Round(d, e, f, &g, h, a, b, &c, 0x80deb1fe3b1696b1ull, w13 = be64_to_cpu(chunk[13])); |
|
||||
Round(c, d, e, &f, g, h, a, &b, 0x9bdc06a725c71235ull, w14 = be64_to_cpu(chunk[14])); |
|
||||
Round(b, c, d, &e, f, g, h, &a, 0xc19bf174cf692694ull, w15 = be64_to_cpu(chunk[15])); |
|
||||
|
|
||||
Round(a, b, c, &d, e, f, g, &h, 0xe49b69c19ef14ad2ull, w0 += sigma1(w14) + w9 + sigma0(w1)); |
|
||||
Round(h, a, b, &c, d, e, f, &g, 0xefbe4786384f25e3ull, w1 += sigma1(w15) + w10 + sigma0(w2)); |
|
||||
Round(g, h, a, &b, c, d, e, &f, 0x0fc19dc68b8cd5b5ull, w2 += sigma1(w0) + w11 + sigma0(w3)); |
|
||||
Round(f, g, h, &a, b, c, d, &e, 0x240ca1cc77ac9c65ull, w3 += sigma1(w1) + w12 + sigma0(w4)); |
|
||||
Round(e, f, g, &h, a, b, c, &d, 0x2de92c6f592b0275ull, w4 += sigma1(w2) + w13 + sigma0(w5)); |
|
||||
Round(d, e, f, &g, h, a, b, &c, 0x4a7484aa6ea6e483ull, w5 += sigma1(w3) + w14 + sigma0(w6)); |
|
||||
Round(c, d, e, &f, g, h, a, &b, 0x5cb0a9dcbd41fbd4ull, w6 += sigma1(w4) + w15 + sigma0(w7)); |
|
||||
Round(b, c, d, &e, f, g, h, &a, 0x76f988da831153b5ull, w7 += sigma1(w5) + w0 + sigma0(w8)); |
|
||||
Round(a, b, c, &d, e, f, g, &h, 0x983e5152ee66dfabull, w8 += sigma1(w6) + w1 + sigma0(w9)); |
|
||||
Round(h, a, b, &c, d, e, f, &g, 0xa831c66d2db43210ull, w9 += sigma1(w7) + w2 + sigma0(w10)); |
|
||||
Round(g, h, a, &b, c, d, e, &f, 0xb00327c898fb213full, w10 += sigma1(w8) + w3 + sigma0(w11)); |
|
||||
Round(f, g, h, &a, b, c, d, &e, 0xbf597fc7beef0ee4ull, w11 += sigma1(w9) + w4 + sigma0(w12)); |
|
||||
Round(e, f, g, &h, a, b, c, &d, 0xc6e00bf33da88fc2ull, w12 += sigma1(w10) + w5 + sigma0(w13)); |
|
||||
Round(d, e, f, &g, h, a, b, &c, 0xd5a79147930aa725ull, w13 += sigma1(w11) + w6 + sigma0(w14)); |
|
||||
Round(c, d, e, &f, g, h, a, &b, 0x06ca6351e003826full, w14 += sigma1(w12) + w7 + sigma0(w15)); |
|
||||
Round(b, c, d, &e, f, g, h, &a, 0x142929670a0e6e70ull, w15 += sigma1(w13) + w8 + sigma0(w0)); |
|
||||
|
|
||||
Round(a, b, c, &d, e, f, g, &h, 0x27b70a8546d22ffcull, w0 += sigma1(w14) + w9 + sigma0(w1)); |
|
||||
Round(h, a, b, &c, d, e, f, &g, 0x2e1b21385c26c926ull, w1 += sigma1(w15) + w10 + sigma0(w2)); |
|
||||
Round(g, h, a, &b, c, d, e, &f, 0x4d2c6dfc5ac42aedull, w2 += sigma1(w0) + w11 + sigma0(w3)); |
|
||||
Round(f, g, h, &a, b, c, d, &e, 0x53380d139d95b3dfull, w3 += sigma1(w1) + w12 + sigma0(w4)); |
|
||||
Round(e, f, g, &h, a, b, c, &d, 0x650a73548baf63deull, w4 += sigma1(w2) + w13 + sigma0(w5)); |
|
||||
Round(d, e, f, &g, h, a, b, &c, 0x766a0abb3c77b2a8ull, w5 += sigma1(w3) + w14 + sigma0(w6)); |
|
||||
Round(c, d, e, &f, g, h, a, &b, 0x81c2c92e47edaee6ull, w6 += sigma1(w4) + w15 + sigma0(w7)); |
|
||||
Round(b, c, d, &e, f, g, h, &a, 0x92722c851482353bull, w7 += sigma1(w5) + w0 + sigma0(w8)); |
|
||||
Round(a, b, c, &d, e, f, g, &h, 0xa2bfe8a14cf10364ull, w8 += sigma1(w6) + w1 + sigma0(w9)); |
|
||||
Round(h, a, b, &c, d, e, f, &g, 0xa81a664bbc423001ull, w9 += sigma1(w7) + w2 + sigma0(w10)); |
|
||||
Round(g, h, a, &b, c, d, e, &f, 0xc24b8b70d0f89791ull, w10 += sigma1(w8) + w3 + sigma0(w11)); |
|
||||
Round(f, g, h, &a, b, c, d, &e, 0xc76c51a30654be30ull, w11 += sigma1(w9) + w4 + sigma0(w12)); |
|
||||
Round(e, f, g, &h, a, b, c, &d, 0xd192e819d6ef5218ull, w12 += sigma1(w10) + w5 + sigma0(w13)); |
|
||||
Round(d, e, f, &g, h, a, b, &c, 0xd69906245565a910ull, w13 += sigma1(w11) + w6 + sigma0(w14)); |
|
||||
Round(c, d, e, &f, g, h, a, &b, 0xf40e35855771202aull, w14 += sigma1(w12) + w7 + sigma0(w15)); |
|
||||
Round(b, c, d, &e, f, g, h, &a, 0x106aa07032bbd1b8ull, w15 += sigma1(w13) + w8 + sigma0(w0)); |
|
||||
|
|
||||
Round(a, b, c, &d, e, f, g, &h, 0x19a4c116b8d2d0c8ull, w0 += sigma1(w14) + w9 + sigma0(w1)); |
|
||||
Round(h, a, b, &c, d, e, f, &g, 0x1e376c085141ab53ull, w1 += sigma1(w15) + w10 + sigma0(w2)); |
|
||||
Round(g, h, a, &b, c, d, e, &f, 0x2748774cdf8eeb99ull, w2 += sigma1(w0) + w11 + sigma0(w3)); |
|
||||
Round(f, g, h, &a, b, c, d, &e, 0x34b0bcb5e19b48a8ull, w3 += sigma1(w1) + w12 + sigma0(w4)); |
|
||||
Round(e, f, g, &h, a, b, c, &d, 0x391c0cb3c5c95a63ull, w4 += sigma1(w2) + w13 + sigma0(w5)); |
|
||||
Round(d, e, f, &g, h, a, b, &c, 0x4ed8aa4ae3418acbull, w5 += sigma1(w3) + w14 + sigma0(w6)); |
|
||||
Round(c, d, e, &f, g, h, a, &b, 0x5b9cca4f7763e373ull, w6 += sigma1(w4) + w15 + sigma0(w7)); |
|
||||
Round(b, c, d, &e, f, g, h, &a, 0x682e6ff3d6b2b8a3ull, w7 += sigma1(w5) + w0 + sigma0(w8)); |
|
||||
Round(a, b, c, &d, e, f, g, &h, 0x748f82ee5defb2fcull, w8 += sigma1(w6) + w1 + sigma0(w9)); |
|
||||
Round(h, a, b, &c, d, e, f, &g, 0x78a5636f43172f60ull, w9 += sigma1(w7) + w2 + sigma0(w10)); |
|
||||
Round(g, h, a, &b, c, d, e, &f, 0x84c87814a1f0ab72ull, w10 += sigma1(w8) + w3 + sigma0(w11)); |
|
||||
Round(f, g, h, &a, b, c, d, &e, 0x8cc702081a6439ecull, w11 += sigma1(w9) + w4 + sigma0(w12)); |
|
||||
Round(e, f, g, &h, a, b, c, &d, 0x90befffa23631e28ull, w12 += sigma1(w10) + w5 + sigma0(w13)); |
|
||||
Round(d, e, f, &g, h, a, b, &c, 0xa4506cebde82bde9ull, w13 += sigma1(w11) + w6 + sigma0(w14)); |
|
||||
Round(c, d, e, &f, g, h, a, &b, 0xbef9a3f7b2c67915ull, w14 += sigma1(w12) + w7 + sigma0(w15)); |
|
||||
Round(b, c, d, &e, f, g, h, &a, 0xc67178f2e372532bull, w15 += sigma1(w13) + w8 + sigma0(w0)); |
|
||||
|
|
||||
Round(a, b, c, &d, e, f, g, &h, 0xca273eceea26619cull, w0 += sigma1(w14) + w9 + sigma0(w1)); |
|
||||
Round(h, a, b, &c, d, e, f, &g, 0xd186b8c721c0c207ull, w1 += sigma1(w15) + w10 + sigma0(w2)); |
|
||||
Round(g, h, a, &b, c, d, e, &f, 0xeada7dd6cde0eb1eull, w2 += sigma1(w0) + w11 + sigma0(w3)); |
|
||||
Round(f, g, h, &a, b, c, d, &e, 0xf57d4f7fee6ed178ull, w3 += sigma1(w1) + w12 + sigma0(w4)); |
|
||||
Round(e, f, g, &h, a, b, c, &d, 0x06f067aa72176fbaull, w4 += sigma1(w2) + w13 + sigma0(w5)); |
|
||||
Round(d, e, f, &g, h, a, b, &c, 0x0a637dc5a2c898a6ull, w5 += sigma1(w3) + w14 + sigma0(w6)); |
|
||||
Round(c, d, e, &f, g, h, a, &b, 0x113f9804bef90daeull, w6 += sigma1(w4) + w15 + sigma0(w7)); |
|
||||
Round(b, c, d, &e, f, g, h, &a, 0x1b710b35131c471bull, w7 += sigma1(w5) + w0 + sigma0(w8)); |
|
||||
Round(a, b, c, &d, e, f, g, &h, 0x28db77f523047d84ull, w8 += sigma1(w6) + w1 + sigma0(w9)); |
|
||||
Round(h, a, b, &c, d, e, f, &g, 0x32caab7b40c72493ull, w9 += sigma1(w7) + w2 + sigma0(w10)); |
|
||||
Round(g, h, a, &b, c, d, e, &f, 0x3c9ebe0a15c9bebcull, w10 += sigma1(w8) + w3 + sigma0(w11)); |
|
||||
Round(f, g, h, &a, b, c, d, &e, 0x431d67c49c100d4cull, w11 += sigma1(w9) + w4 + sigma0(w12)); |
|
||||
Round(e, f, g, &h, a, b, c, &d, 0x4cc5d4becb3e42b6ull, w12 += sigma1(w10) + w5 + sigma0(w13)); |
|
||||
Round(d, e, f, &g, h, a, b, &c, 0x597f299cfc657e2aull, w13 += sigma1(w11) + w6 + sigma0(w14)); |
|
||||
Round(c, d, e, &f, g, h, a, &b, 0x5fcb6fab3ad6faecull, w14 + sigma1(w12) + w7 + sigma0(w15)); |
|
||||
Round(b, c, d, &e, f, g, h, &a, 0x6c44198c4a475817ull, w15 + sigma1(w13) + w8 + sigma0(w0)); |
|
||||
|
|
||||
s[0] += a; |
|
||||
s[1] += b; |
|
||||
s[2] += c; |
|
||||
s[3] += d; |
|
||||
s[4] += e; |
|
||||
s[5] += f; |
|
||||
s[6] += g; |
|
||||
s[7] += h; |
|
||||
} |
|
||||
|
|
||||
static void add(struct sha512_ctx *ctx, const void *p, size_t len) |
|
||||
{ |
|
||||
const unsigned char *data = p; |
|
||||
size_t bufsize = ctx->bytes % 128; |
|
||||
|
|
||||
if (bufsize + len >= 128) { |
|
||||
/* Fill the buffer, and process it. */ |
|
||||
memcpy(ctx->buf.u8 + bufsize, data, 128 - bufsize); |
|
||||
ctx->bytes += 128 - bufsize; |
|
||||
data += 128 - bufsize; |
|
||||
len -= 128 - bufsize; |
|
||||
Transform(ctx->s, ctx->buf.u64); |
|
||||
bufsize = 0; |
|
||||
} |
|
||||
|
|
||||
while (len >= 128) { |
|
||||
/* Process full chunks directly from the source. */ |
|
||||
if (alignment_ok(data, sizeof(uint64_t))) |
|
||||
Transform(ctx->s, (const uint64_t *)data); |
|
||||
else { |
|
||||
memcpy(ctx->buf.u8, data, sizeof(ctx->buf)); |
|
||||
Transform(ctx->s, ctx->buf.u64); |
|
||||
} |
|
||||
ctx->bytes += 128; |
|
||||
data += 128; |
|
||||
len -= 128; |
|
||||
} |
|
||||
|
|
||||
if (len) { |
|
||||
/* Fill the buffer with what remains. */ |
|
||||
memcpy(ctx->buf.u8 + bufsize, data, len); |
|
||||
ctx->bytes += len; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
void sha512_init(struct sha512_ctx *ctx) |
|
||||
{ |
|
||||
struct sha512_ctx init = SHA512_INIT; |
|
||||
*ctx = init; |
|
||||
} |
|
||||
|
|
||||
void sha512_update(struct sha512_ctx *ctx, const void *p, size_t size) |
|
||||
{ |
|
||||
check_sha512(ctx); |
|
||||
add(ctx, p, size); |
|
||||
} |
|
||||
|
|
||||
void sha512_done(struct sha512_ctx *ctx, struct sha512 *res) |
|
||||
{ |
|
||||
static const unsigned char pad[128] = { 0x80 }; |
|
||||
uint64_t sizedesc[2] = { 0, 0 }; |
|
||||
size_t i; |
|
||||
|
|
||||
sizedesc[1] = cpu_to_be64((uint64_t)ctx->bytes << 3); |
|
||||
|
|
||||
/* Add '1' bit to terminate, then all 0 bits, up to next block - 16. */ |
|
||||
add(ctx, pad, 1 + ((256 - 16 - (ctx->bytes % 128) - 1) % 128)); |
|
||||
/* Add number of bits of data (big endian) */ |
|
||||
add(ctx, sizedesc, sizeof(sizedesc)); |
|
||||
for (i = 0; i < sizeof(ctx->s) / sizeof(ctx->s[0]); i++) |
|
||||
res->u.u64[i] = cpu_to_be64(ctx->s[i]); |
|
||||
invalidate_sha512(ctx); |
|
||||
} |
|
||||
#endif /* CCAN_CRYPTO_SHA512_USE_OPENSSL */ |
|
||||
|
|
||||
void sha512(struct sha512 *sha, const void *p, size_t size) |
|
||||
{ |
|
||||
struct sha512_ctx ctx; |
|
||||
|
|
||||
sha512_init(&ctx); |
|
||||
sha512_update(&ctx, p, size); |
|
||||
sha512_done(&ctx, sha); |
|
||||
CCAN_CLEAR_MEMORY(&ctx, sizeof(ctx)); |
|
||||
} |
|
@ -1,135 +0,0 @@ |
|||||
#ifndef CCAN_CRYPTO_SHA512_H |
|
||||
#define CCAN_CRYPTO_SHA512_H |
|
||||
/* BSD-MIT - see LICENSE file for details */ |
|
||||
#include "config.h" |
|
||||
#include <stdint.h> |
|
||||
#include <stdlib.h> |
|
||||
|
|
||||
/* Uncomment this to use openssl's SHA512 routines (and link with -lcrypto) */ |
|
||||
/*#define CCAN_CRYPTO_SHA512_USE_OPENSSL 1*/ |
|
||||
|
|
||||
#ifdef CCAN_CRYPTO_SHA512_USE_OPENSSL |
|
||||
#include <openssl/sha.h> |
|
||||
#endif |
|
||||
|
|
||||
/**
|
|
||||
* struct sha512 - structure representing a completed SHA512. |
|
||||
* @u.u8: an unsigned char array. |
|
||||
* @u.u64: a 64-bit integer array. |
|
||||
* |
|
||||
* Other fields may be added to the union in future. |
|
||||
*/ |
|
||||
struct sha512 { |
|
||||
union { |
|
||||
uint64_t u64[8]; |
|
||||
unsigned char u8[64]; |
|
||||
} u; |
|
||||
}; |
|
||||
|
|
||||
/**
|
|
||||
* sha512 - return sha512 of an object. |
|
||||
* @sha512: the sha512 to fill in |
|
||||
* @p: pointer to memory, |
|
||||
* @size: the number of bytes pointed to by @p |
|
||||
* |
|
||||
* The bytes pointed to by @p is SHA512 hashed into @sha512. This is |
|
||||
* equivalent to sha512_init(), sha512_update() then sha512_done(). |
|
||||
*/ |
|
||||
void sha512(struct sha512 *sha, const void *p, size_t size); |
|
||||
|
|
||||
/**
|
|
||||
* struct sha512_ctx - structure to store running context for sha512 |
|
||||
*/ |
|
||||
struct sha512_ctx { |
|
||||
#ifdef CCAN_CRYPTO_SHA512_USE_OPENSSL |
|
||||
SHA512_CTX c; |
|
||||
#else |
|
||||
uint64_t s[8]; |
|
||||
union { |
|
||||
uint64_t u64[16]; |
|
||||
unsigned char u8[128]; |
|
||||
} buf; |
|
||||
size_t bytes; |
|
||||
#endif |
|
||||
}; |
|
||||
|
|
||||
/**
|
|
||||
* sha512_init - initialize an SHA512 context. |
|
||||
* @ctx: the sha512_ctx to initialize |
|
||||
* |
|
||||
* This must be called before sha512_update or sha512_done, or |
|
||||
* alternately you can assign SHA512_INIT. |
|
||||
* |
|
||||
* If it was already initialized, this forgets anything which was |
|
||||
* hashed before. |
|
||||
* |
|
||||
* Example: |
|
||||
* static void hash_all(const char **arr, struct sha512 *hash) |
|
||||
* { |
|
||||
* size_t i; |
|
||||
* struct sha512_ctx ctx; |
|
||||
* |
|
||||
* sha512_init(&ctx); |
|
||||
* for (i = 0; arr[i]; i++) |
|
||||
* sha512_update(&ctx, arr[i], strlen(arr[i])); |
|
||||
* sha512_done(&ctx, hash); |
|
||||
* } |
|
||||
*/ |
|
||||
void sha512_init(struct sha512_ctx *ctx); |
|
||||
|
|
||||
/**
|
|
||||
* SHA512_INIT - initializer for an SHA512 context. |
|
||||
* |
|
||||
* This can be used to statically initialize an SHA512 context (instead |
|
||||
* of sha512_init()). |
|
||||
* |
|
||||
* Example: |
|
||||
* static void hash_all(const char **arr, struct sha512 *hash) |
|
||||
* { |
|
||||
* size_t i; |
|
||||
* struct sha512_ctx ctx = SHA512_INIT; |
|
||||
* |
|
||||
* for (i = 0; arr[i]; i++) |
|
||||
* sha512_update(&ctx, arr[i], strlen(arr[i])); |
|
||||
* sha512_done(&ctx, hash); |
|
||||
* } |
|
||||
*/ |
|
||||
#ifdef CCAN_CRYPTO_SHA512_USE_OPENSSL |
|
||||
{ { { 0x6a09e667f3bcc908ull, 0xbb67ae8584caa73bull, \ |
|
||||
0x3c6ef372fe94f82bull, 0xa54ff53a5f1d36f1ull, \ |
|
||||
0x510e527fade682d1ull, 0x9b05688c2b3e6c1full, \ |
|
||||
0x1f83d9abfb41bd6bull, 0x5be0cd19137e2179ull }, \ |
|
||||
0, 0, \ |
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, \ |
|
||||
0, 0x40 } } |
|
||||
#else |
|
||||
#define SHA512_INIT \ |
|
||||
{ { 0x6a09e667f3bcc908ull, 0xbb67ae8584caa73bull, \ |
|
||||
0x3c6ef372fe94f82bull, 0xa54ff53a5f1d36f1ull, \ |
|
||||
0x510e527fade682d1ull, 0x9b05688c2b3e6c1full, \ |
|
||||
0x1f83d9abfb41bd6bull, 0x5be0cd19137e2179ull }, \ |
|
||||
{ { 0 } }, 0 } |
|
||||
#endif |
|
||||
|
|
||||
/**
|
|
||||
* sha512_update - include some memory in the hash. |
|
||||
* @ctx: the sha512_ctx to use |
|
||||
* @p: pointer to memory, |
|
||||
* @size: the number of bytes pointed to by @p |
|
||||
* |
|
||||
* You can call this multiple times to hash more data, before calling |
|
||||
* sha512_done(). |
|
||||
*/ |
|
||||
void sha512_update(struct sha512_ctx *ctx, const void *p, size_t size); |
|
||||
|
|
||||
/**
|
|
||||
* sha512_done - finish SHA512 and return the hash |
|
||||
* @ctx: the sha512_ctx to complete |
|
||||
* @res: the hash to return. |
|
||||
* |
|
||||
* Note that @ctx is *destroyed* by this, and must be reinitialized. |
|
||||
* To avoid that, pass a copy instead. |
|
||||
*/ |
|
||||
void sha512_done(struct sha512_ctx *sha512, struct sha512 *res); |
|
||||
|
|
||||
#endif /* CCAN_CRYPTO_SHA512_H */ |
|
@ -1 +0,0 @@ |
|||||
../../licenses/CC0 |
|
@ -1,55 +0,0 @@ |
|||||
#include "config.h" |
|
||||
#include <stdio.h> |
|
||||
#include <string.h> |
|
||||
|
|
||||
/** |
|
||||
* endian - endian conversion macros for simple types |
|
||||
* |
|
||||
* Portable protocols (such as on-disk formats, or network protocols) |
|
||||
* are often defined to be a particular endian: little-endian (least |
|
||||
* significant bytes first) or big-endian (most significant bytes |
|
||||
* first). |
|
||||
* |
|
||||
* Similarly, some CPUs lay out values in memory in little-endian |
|
||||
* order (most commonly, Intel's 8086 and derivatives), or big-endian |
|
||||
* order (almost everyone else). |
|
||||
* |
|
||||
* This module provides conversion routines, inspired by the linux kernel. |
|
||||
* It also provides leint32_t, beint32_t etc typedefs, which are annotated for |
|
||||
* the sparse checker. |
|
||||
* |
|
||||
* Example: |
|
||||
* #include <stdio.h> |
|
||||
* #include <err.h> |
|
||||
* #include <ccan/endian/endian.h> |
|
||||
* |
|
||||
* // |
|
||||
* int main(int argc, char *argv[]) |
|
||||
* { |
|
||||
* uint32_t value; |
|
||||
* |
|
||||
* if (argc != 2) |
|
||||
* errx(1, "Usage: %s <value>", argv[0]); |
|
||||
* |
|
||||
* value = atoi(argv[1]); |
|
||||
* printf("native: %08x\n", value); |
|
||||
* printf("little-endian: %08x\n", cpu_to_le32(value)); |
|
||||
* printf("big-endian: %08x\n", cpu_to_be32(value)); |
|
||||
* printf("byte-reversed: %08x\n", bswap_32(value)); |
|
||||
* exit(0); |
|
||||
* } |
|
||||
* |
|
||||
* License: License: CC0 (Public domain) |
|
||||
* Author: Rusty Russell <rusty@rustcorp.com.au> |
|
||||
*/ |
|
||||
int main(int argc, char *argv[]) |
|
||||
{ |
|
||||
if (argc != 2) |
|
||||
return 1; |
|
||||
|
|
||||
if (strcmp(argv[1], "depends") == 0) |
|
||||
/* Nothing */ |
|
||||
return 0; |
|
||||
|
|
||||
return 1; |
|
||||
} |
|
@ -1,346 +0,0 @@ |
|||||
/* CC0 (Public domain) - see LICENSE file for details */ |
|
||||
#ifndef CCAN_ENDIAN_H |
|
||||
#define CCAN_ENDIAN_H |
|
||||
#include <stdint.h> |
|
||||
#include "config.h" |
|
||||
|
|
||||
/**
|
|
||||
* BSWAP_16 - reverse bytes in a constant uint16_t value. |
|
||||
* @val: constant value whose bytes to swap. |
|
||||
* |
|
||||
* Designed to be usable in constant-requiring initializers. |
|
||||
* |
|
||||
* Example: |
|
||||
* struct mystruct { |
|
||||
* char buf[BSWAP_16(0x1234)]; |
|
||||
* }; |
|
||||
*/ |
|
||||
#define BSWAP_16(val) \ |
|
||||
((((uint16_t)(val) & 0x00ff) << 8) \ |
|
||||
| (((uint16_t)(val) & 0xff00) >> 8)) |
|
||||
|
|
||||
/**
|
|
||||
* BSWAP_32 - reverse bytes in a constant uint32_t value. |
|
||||
* @val: constant value whose bytes to swap. |
|
||||
* |
|
||||
* Designed to be usable in constant-requiring initializers. |
|
||||
* |
|
||||
* Example: |
|
||||
* struct mystruct { |
|
||||
* char buf[BSWAP_32(0xff000000)]; |
|
||||
* }; |
|
||||
*/ |
|
||||
#define BSWAP_32(val) \ |
|
||||
((((uint32_t)(val) & 0x000000ff) << 24) \ |
|
||||
| (((uint32_t)(val) & 0x0000ff00) << 8) \ |
|
||||
| (((uint32_t)(val) & 0x00ff0000) >> 8) \ |
|
||||
| (((uint32_t)(val) & 0xff000000) >> 24)) |
|
||||
|
|
||||
/**
|
|
||||
* BSWAP_64 - reverse bytes in a constant uint64_t value. |
|
||||
* @val: constantvalue whose bytes to swap. |
|
||||
* |
|
||||
* Designed to be usable in constant-requiring initializers. |
|
||||
* |
|
||||
* Example: |
|
||||
* struct mystruct { |
|
||||
* char buf[BSWAP_64(0xff00000000000000ULL)]; |
|
||||
* }; |
|
||||
*/ |
|
||||
#define BSWAP_64(val) \ |
|
||||
((((uint64_t)(val) & 0x00000000000000ffULL) << 56) \ |
|
||||
| (((uint64_t)(val) & 0x000000000000ff00ULL) << 40) \ |
|
||||
| (((uint64_t)(val) & 0x0000000000ff0000ULL) << 24) \ |
|
||||
| (((uint64_t)(val) & 0x00000000ff000000ULL) << 8) \ |
|
||||
| (((uint64_t)(val) & 0x000000ff00000000ULL) >> 8) \ |
|
||||
| (((uint64_t)(val) & 0x0000ff0000000000ULL) >> 24) \ |
|
||||
| (((uint64_t)(val) & 0x00ff000000000000ULL) >> 40) \ |
|
||||
| (((uint64_t)(val) & 0xff00000000000000ULL) >> 56)) |
|
||||
|
|
||||
#if HAVE_BYTESWAP_H |
|
||||
#include <byteswap.h> |
|
||||
#else |
|
||||
/**
|
|
||||
* bswap_16 - reverse bytes in a uint16_t value. |
|
||||
* @val: value whose bytes to swap. |
|
||||
* |
|
||||
* Example: |
|
||||
* // Output contains "1024 is 4 as two bytes reversed"
|
|
||||
* printf("1024 is %u as two bytes reversed\n", bswap_16(1024)); |
|
||||
*/ |
|
||||
static inline uint16_t bswap_16(uint16_t val) |
|
||||
{ |
|
||||
return BSWAP_16(val); |
|
||||
} |
|
||||
|
|
||||
/**
|
|
||||
* bswap_32 - reverse bytes in a uint32_t value. |
|
||||
* @val: value whose bytes to swap. |
|
||||
* |
|
||||
* Example: |
|
||||
* // Output contains "1024 is 262144 as four bytes reversed"
|
|
||||
* printf("1024 is %u as four bytes reversed\n", bswap_32(1024)); |
|
||||
*/ |
|
||||
static inline uint32_t bswap_32(uint32_t val) |
|
||||
{ |
|
||||
return BSWAP_32(val); |
|
||||
} |
|
||||
#endif /* !HAVE_BYTESWAP_H */ |
|
||||
|
|
||||
#if !HAVE_BSWAP_64 |
|
||||
/**
|
|
||||
* bswap_64 - reverse bytes in a uint64_t value. |
|
||||
* @val: value whose bytes to swap. |
|
||||
* |
|
||||
* Example: |
|
||||
* // Output contains "1024 is 1125899906842624 as eight bytes reversed"
|
|
||||
* printf("1024 is %llu as eight bytes reversed\n", |
|
||||
* (unsigned long long)bswap_64(1024)); |
|
||||
*/ |
|
||||
static inline uint64_t bswap_64(uint64_t val) |
|
||||
{ |
|
||||
return BSWAP_64(val); |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
/* Sanity check the defines. We don't handle weird endianness. */ |
|
||||
#if !HAVE_LITTLE_ENDIAN && !HAVE_BIG_ENDIAN |
|
||||
#error "Unknown endian" |
|
||||
#elif HAVE_LITTLE_ENDIAN && HAVE_BIG_ENDIAN |
|
||||
#error "Can't compile for both big and little endian." |
|
||||
#endif |
|
||||
|
|
||||
#ifdef __CHECKER__ |
|
||||
/* sparse needs forcing to remove bitwise attribute from ccan/short_types */ |
|
||||
#define ENDIAN_CAST __attribute__((force)) |
|
||||
#define ENDIAN_TYPE __attribute__((bitwise)) |
|
||||
#else |
|
||||
#define ENDIAN_CAST |
|
||||
#define ENDIAN_TYPE |
|
||||
#endif |
|
||||
|
|
||||
typedef uint64_t ENDIAN_TYPE leint64_t; |
|
||||
typedef uint64_t ENDIAN_TYPE beint64_t; |
|
||||
typedef uint32_t ENDIAN_TYPE leint32_t; |
|
||||
typedef uint32_t ENDIAN_TYPE beint32_t; |
|
||||
typedef uint16_t ENDIAN_TYPE leint16_t; |
|
||||
typedef uint16_t ENDIAN_TYPE beint16_t; |
|
||||
|
|
||||
#if HAVE_LITTLE_ENDIAN |
|
||||
/**
|
|
||||
* CPU_TO_LE64 - convert a constant uint64_t value to little-endian |
|
||||
* @native: constant to convert |
|
||||
*/ |
|
||||
#define CPU_TO_LE64(native) ((ENDIAN_CAST leint64_t)(native)) |
|
||||
|
|
||||
/**
|
|
||||
* CPU_TO_LE32 - convert a constant uint32_t value to little-endian |
|
||||
* @native: constant to convert |
|
||||
*/ |
|
||||
#define CPU_TO_LE32(native) ((ENDIAN_CAST leint32_t)(native)) |
|
||||
|
|
||||
/**
|
|
||||
* CPU_TO_LE16 - convert a constant uint16_t value to little-endian |
|
||||
* @native: constant to convert |
|
||||
*/ |
|
||||
#define CPU_TO_LE16(native) ((ENDIAN_CAST leint16_t)(native)) |
|
||||
|
|
||||
/**
|
|
||||
* LE64_TO_CPU - convert a little-endian uint64_t constant |
|
||||
* @le_val: little-endian constant to convert |
|
||||
*/ |
|
||||
#define LE64_TO_CPU(le_val) ((ENDIAN_CAST uint64_t)(le_val)) |
|
||||
|
|
||||
/**
|
|
||||
* LE32_TO_CPU - convert a little-endian uint32_t constant |
|
||||
* @le_val: little-endian constant to convert |
|
||||
*/ |
|
||||
#define LE32_TO_CPU(le_val) ((ENDIAN_CAST uint32_t)(le_val)) |
|
||||
|
|
||||
/**
|
|
||||
* LE16_TO_CPU - convert a little-endian uint16_t constant |
|
||||
* @le_val: little-endian constant to convert |
|
||||
*/ |
|
||||
#define LE16_TO_CPU(le_val) ((ENDIAN_CAST uint16_t)(le_val)) |
|
||||
|
|
||||
#else /* ... HAVE_BIG_ENDIAN */ |
|
||||
#define CPU_TO_LE64(native) ((ENDIAN_CAST leint64_t)BSWAP_64(native)) |
|
||||
#define CPU_TO_LE32(native) ((ENDIAN_CAST leint32_t)BSWAP_32(native)) |
|
||||
#define CPU_TO_LE16(native) ((ENDIAN_CAST leint16_t)BSWAP_16(native)) |
|
||||
#define LE64_TO_CPU(le_val) BSWAP_64((ENDIAN_CAST uint64_t)le_val) |
|
||||
#define LE32_TO_CPU(le_val) BSWAP_32((ENDIAN_CAST uint32_t)le_val) |
|
||||
#define LE16_TO_CPU(le_val) BSWAP_16((ENDIAN_CAST uint16_t)le_val) |
|
||||
#endif /* HAVE_BIG_ENDIAN */ |
|
||||
|
|
||||
#if HAVE_BIG_ENDIAN |
|
||||
/**
|
|
||||
* CPU_TO_BE64 - convert a constant uint64_t value to big-endian |
|
||||
* @native: constant to convert |
|
||||
*/ |
|
||||
#define CPU_TO_BE64(native) ((ENDIAN_CAST beint64_t)(native)) |
|
||||
|
|
||||
/**
|
|
||||
* CPU_TO_BE32 - convert a constant uint32_t value to big-endian |
|
||||
* @native: constant to convert |
|
||||
*/ |
|
||||
#define CPU_TO_BE32(native) ((ENDIAN_CAST beint32_t)(native)) |
|
||||
|
|
||||
/**
|
|
||||
* CPU_TO_BE16 - convert a constant uint16_t value to big-endian |
|
||||
* @native: constant to convert |
|
||||
*/ |
|
||||
#define CPU_TO_BE16(native) ((ENDIAN_CAST beint16_t)(native)) |
|
||||
|
|
||||
/**
|
|
||||
* BE64_TO_CPU - convert a big-endian uint64_t constant |
|
||||
* @le_val: big-endian constant to convert |
|
||||
*/ |
|
||||
#define BE64_TO_CPU(le_val) ((ENDIAN_CAST uint64_t)(le_val)) |
|
||||
|
|
||||
/**
|
|
||||
* BE32_TO_CPU - convert a big-endian uint32_t constant |
|
||||
* @le_val: big-endian constant to convert |
|
||||
*/ |
|
||||
#define BE32_TO_CPU(le_val) ((ENDIAN_CAST uint32_t)(le_val)) |
|
||||
|
|
||||
/**
|
|
||||
* BE16_TO_CPU - convert a big-endian uint16_t constant |
|
||||
* @le_val: big-endian constant to convert |
|
||||
*/ |
|
||||
#define BE16_TO_CPU(le_val) ((ENDIAN_CAST uint16_t)(le_val)) |
|
||||
|
|
||||
#else /* ... HAVE_LITTLE_ENDIAN */ |
|
||||
#define CPU_TO_BE64(native) ((ENDIAN_CAST beint64_t)BSWAP_64(native)) |
|
||||
#define CPU_TO_BE32(native) ((ENDIAN_CAST beint32_t)BSWAP_32(native)) |
|
||||
#define CPU_TO_BE16(native) ((ENDIAN_CAST beint16_t)BSWAP_16(native)) |
|
||||
#define BE64_TO_CPU(le_val) BSWAP_64((ENDIAN_CAST uint64_t)le_val) |
|
||||
#define BE32_TO_CPU(le_val) BSWAP_32((ENDIAN_CAST uint32_t)le_val) |
|
||||
#define BE16_TO_CPU(le_val) BSWAP_16((ENDIAN_CAST uint16_t)le_val) |
|
||||
#endif /* HAVE_LITTE_ENDIAN */ |
|
||||
|
|
||||
|
|
||||
/**
|
|
||||
* cpu_to_le64 - convert a uint64_t value to little-endian |
|
||||
* @native: value to convert |
|
||||
*/ |
|
||||
static inline leint64_t cpu_to_le64(uint64_t native) |
|
||||
{ |
|
||||
return CPU_TO_LE64(native); |
|
||||
} |
|
||||
|
|
||||
/**
|
|
||||
* cpu_to_le32 - convert a uint32_t value to little-endian |
|
||||
* @native: value to convert |
|
||||
*/ |
|
||||
static inline leint32_t cpu_to_le32(uint32_t native) |
|
||||
{ |
|
||||
return CPU_TO_LE32(native); |
|
||||
} |
|
||||
|
|
||||
/**
|
|
||||
* cpu_to_le16 - convert a uint16_t value to little-endian |
|
||||
* @native: value to convert |
|
||||
*/ |
|
||||
static inline leint16_t cpu_to_le16(uint16_t native) |
|
||||
{ |
|
||||
return CPU_TO_LE16(native); |
|
||||
} |
|
||||
|
|
||||
/**
|
|
||||
* le64_to_cpu - convert a little-endian uint64_t value |
|
||||
* @le_val: little-endian value to convert |
|
||||
*/ |
|
||||
static inline uint64_t le64_to_cpu(leint64_t le_val) |
|
||||
{ |
|
||||
return LE64_TO_CPU(le_val); |
|
||||
} |
|
||||
|
|
||||
/**
|
|
||||
* le32_to_cpu - convert a little-endian uint32_t value |
|
||||
* @le_val: little-endian value to convert |
|
||||
*/ |
|
||||
static inline uint32_t le32_to_cpu(leint32_t le_val) |
|
||||
{ |
|
||||
return LE32_TO_CPU(le_val); |
|
||||
} |
|
||||
|
|
||||
/**
|
|
||||
* le16_to_cpu - convert a little-endian uint16_t value |
|
||||
* @le_val: little-endian value to convert |
|
||||
*/ |
|
||||
static inline uint16_t le16_to_cpu(leint16_t le_val) |
|
||||
{ |
|
||||
return LE16_TO_CPU(le_val); |
|
||||
} |
|
||||
|
|
||||
/**
|
|
||||
* cpu_to_be64 - convert a uint64_t value to big endian. |
|
||||
* @native: value to convert |
|
||||
*/ |
|
||||
static inline beint64_t cpu_to_be64(uint64_t native) |
|
||||
{ |
|
||||
return CPU_TO_BE64(native); |
|
||||
} |
|
||||
|
|
||||
/**
|
|
||||
* cpu_to_be32 - convert a uint32_t value to big endian. |
|
||||
* @native: value to convert |
|
||||
*/ |
|
||||
static inline beint32_t cpu_to_be32(uint32_t native) |
|
||||
{ |
|
||||
return CPU_TO_BE32(native); |
|
||||
} |
|
||||
|
|
||||
/**
|
|
||||
* cpu_to_be16 - convert a uint16_t value to big endian. |
|
||||
* @native: value to convert |
|
||||
*/ |
|
||||
static inline beint16_t cpu_to_be16(uint16_t native) |
|
||||
{ |
|
||||
return CPU_TO_BE16(native); |
|
||||
} |
|
||||
|
|
||||
/**
|
|
||||
* be64_to_cpu - convert a big-endian uint64_t value |
|
||||
* @be_val: big-endian value to convert |
|
||||
*/ |
|
||||
static inline uint64_t be64_to_cpu(beint64_t be_val) |
|
||||
{ |
|
||||
return BE64_TO_CPU(be_val); |
|
||||
} |
|
||||
|
|
||||
/**
|
|
||||
* be32_to_cpu - convert a big-endian uint32_t value |
|
||||
* @be_val: big-endian value to convert |
|
||||
*/ |
|
||||
static inline uint32_t be32_to_cpu(beint32_t be_val) |
|
||||
{ |
|
||||
return BE32_TO_CPU(be_val); |
|
||||
} |
|
||||
|
|
||||
/**
|
|
||||
* be16_to_cpu - convert a big-endian uint16_t value |
|
||||
* @be_val: big-endian value to convert |
|
||||
*/ |
|
||||
static inline uint16_t be16_to_cpu(beint16_t be_val) |
|
||||
{ |
|
||||
return BE16_TO_CPU(be_val); |
|
||||
} |
|
||||
|
|
||||
/* Whichever they include first, they get these definitions. */ |
|
||||
#ifdef CCAN_SHORT_TYPES_H |
|
||||
/**
|
|
||||
* be64/be32/be16 - 64/32/16 bit big-endian representation. |
|
||||
*/ |
|
||||
typedef beint64_t be64; |
|
||||
typedef beint32_t be32; |
|
||||
typedef beint16_t be16; |
|
||||
|
|
||||
/**
|
|
||||
* le64/le32/le16 - 64/32/16 bit little-endian representation. |
|
||||
*/ |
|
||||
typedef leint64_t le64; |
|
||||
typedef leint32_t le32; |
|
||||
typedef leint16_t le16; |
|
||||
#endif |
|
||||
#endif /* CCAN_ENDIAN_H */ |
|
@ -1,12 +0,0 @@ |
|||||
#include <ccan/endian/endian.h> |
|
||||
|
|
||||
struct foo { |
|
||||
char one[BSWAP_16(0xFF00)]; |
|
||||
char two[BSWAP_32(0xFF000000)]; |
|
||||
char three[BSWAP_64(0xFF00000000000000ULL)]; |
|
||||
}; |
|
||||
|
|
||||
int main(void) |
|
||||
{ |
|
||||
return 0; |
|
||||
} |
|
@ -1,106 +0,0 @@ |
|||||
#include <ccan/endian/endian.h> |
|
||||
#include <stdlib.h> |
|
||||
#include <stddef.h> |
|
||||
#include <ccan/tap/tap.h> |
|
||||
|
|
||||
int main(int argc, char *argv[]) |
|
||||
{ |
|
||||
union { |
|
||||
uint64_t u64; |
|
||||
unsigned char u64_bytes[8]; |
|
||||
} u64; |
|
||||
union { |
|
||||
uint32_t u32; |
|
||||
unsigned char u32_bytes[4]; |
|
||||
} u32; |
|
||||
union { |
|
||||
uint16_t u16; |
|
||||
unsigned char u16_bytes[2]; |
|
||||
} u16; |
|
||||
|
|
||||
plan_tests(48); |
|
||||
|
|
||||
/* Straight swap tests. */ |
|
||||
u64.u64_bytes[0] = 0x00; |
|
||||
u64.u64_bytes[1] = 0x11; |
|
||||
u64.u64_bytes[2] = 0x22; |
|
||||
u64.u64_bytes[3] = 0x33; |
|
||||
u64.u64_bytes[4] = 0x44; |
|
||||
u64.u64_bytes[5] = 0x55; |
|
||||
u64.u64_bytes[6] = 0x66; |
|
||||
u64.u64_bytes[7] = 0x77; |
|
||||
u64.u64 = bswap_64(u64.u64); |
|
||||
ok1(u64.u64_bytes[7] == 0x00); |
|
||||
ok1(u64.u64_bytes[6] == 0x11); |
|
||||
ok1(u64.u64_bytes[5] == 0x22); |
|
||||
ok1(u64.u64_bytes[4] == 0x33); |
|
||||
ok1(u64.u64_bytes[3] == 0x44); |
|
||||
ok1(u64.u64_bytes[2] == 0x55); |
|
||||
ok1(u64.u64_bytes[1] == 0x66); |
|
||||
ok1(u64.u64_bytes[0] == 0x77); |
|
||||
|
|
||||
u32.u32_bytes[0] = 0x00; |
|
||||
u32.u32_bytes[1] = 0x11; |
|
||||
u32.u32_bytes[2] = 0x22; |
|
||||
u32.u32_bytes[3] = 0x33; |
|
||||
u32.u32 = bswap_32(u32.u32); |
|
||||
ok1(u32.u32_bytes[3] == 0x00); |
|
||||
ok1(u32.u32_bytes[2] == 0x11); |
|
||||
ok1(u32.u32_bytes[1] == 0x22); |
|
||||
ok1(u32.u32_bytes[0] == 0x33); |
|
||||
|
|
||||
u16.u16_bytes[0] = 0x00; |
|
||||
u16.u16_bytes[1] = 0x11; |
|
||||
u16.u16 = bswap_16(u16.u16); |
|
||||
ok1(u16.u16_bytes[1] == 0x00); |
|
||||
ok1(u16.u16_bytes[0] == 0x11); |
|
||||
|
|
||||
/* Endian tests. */ |
|
||||
u64.u64 = cpu_to_le64(0x0011223344556677ULL); |
|
||||
ok1(u64.u64_bytes[0] == 0x77); |
|
||||
ok1(u64.u64_bytes[1] == 0x66); |
|
||||
ok1(u64.u64_bytes[2] == 0x55); |
|
||||
ok1(u64.u64_bytes[3] == 0x44); |
|
||||
ok1(u64.u64_bytes[4] == 0x33); |
|
||||
ok1(u64.u64_bytes[5] == 0x22); |
|
||||
ok1(u64.u64_bytes[6] == 0x11); |
|
||||
ok1(u64.u64_bytes[7] == 0x00); |
|
||||
ok1(le64_to_cpu(u64.u64) == 0x0011223344556677ULL); |
|
||||
|
|
||||
u64.u64 = cpu_to_be64(0x0011223344556677ULL); |
|
||||
ok1(u64.u64_bytes[7] == 0x77); |
|
||||
ok1(u64.u64_bytes[6] == 0x66); |
|
||||
ok1(u64.u64_bytes[5] == 0x55); |
|
||||
ok1(u64.u64_bytes[4] == 0x44); |
|
||||
ok1(u64.u64_bytes[3] == 0x33); |
|
||||
ok1(u64.u64_bytes[2] == 0x22); |
|
||||
ok1(u64.u64_bytes[1] == 0x11); |
|
||||
ok1(u64.u64_bytes[0] == 0x00); |
|
||||
ok1(be64_to_cpu(u64.u64) == 0x0011223344556677ULL); |
|
||||
|
|
||||
u32.u32 = cpu_to_le32(0x00112233); |
|
||||
ok1(u32.u32_bytes[0] == 0x33); |
|
||||
ok1(u32.u32_bytes[1] == 0x22); |
|
||||
ok1(u32.u32_bytes[2] == 0x11); |
|
||||
ok1(u32.u32_bytes[3] == 0x00); |
|
||||
ok1(le32_to_cpu(u32.u32) == 0x00112233); |
|
||||
|
|
||||
u32.u32 = cpu_to_be32(0x00112233); |
|
||||
ok1(u32.u32_bytes[3] == 0x33); |
|
||||
ok1(u32.u32_bytes[2] == 0x22); |
|
||||
ok1(u32.u32_bytes[1] == 0x11); |
|
||||
ok1(u32.u32_bytes[0] == 0x00); |
|
||||
ok1(be32_to_cpu(u32.u32) == 0x00112233); |
|
||||
|
|
||||
u16.u16 = cpu_to_le16(0x0011); |
|
||||
ok1(u16.u16_bytes[0] == 0x11); |
|
||||
ok1(u16.u16_bytes[1] == 0x00); |
|
||||
ok1(le16_to_cpu(u16.u16) == 0x0011); |
|
||||
|
|
||||
u16.u16 = cpu_to_be16(0x0011); |
|
||||
ok1(u16.u16_bytes[1] == 0x11); |
|
||||
ok1(u16.u16_bytes[0] == 0x00); |
|
||||
ok1(be16_to_cpu(u16.u16) == 0x0011); |
|
||||
|
|
||||
exit(exit_status()); |
|
||||
} |
|
@ -1 +0,0 @@ |
|||||
../../../licenses/CC0 |
|
@ -1,39 +0,0 @@ |
|||||
#include "config.h" |
|
||||
#include <stdio.h> |
|
||||
#include <string.h> |
|
||||
|
|
||||
/** |
|
||||
* str/hex - hex-to-string conversions and vice-versa |
|
||||
* |
|
||||
* This code contains simple routines for hexidecimal strings. |
|
||||
* |
|
||||
* License: CC0 (Public domain) |
|
||||
* Author: Rusty Russell <rusty@rustcorp.com.au> |
|
||||
* |
|
||||
* Example: |
|
||||
* int main(int argc, char *argv[]) |
|
||||
* { |
|
||||
* int i; |
|
||||
* |
|
||||
* for (i = 1; i < argc; i++) { |
|
||||
* char str[hex_str_size(strlen(argv[i]))]; |
|
||||
* |
|
||||
* hex_encode(str, sizeof(str), argv[i], strlen(argv[i])); |
|
||||
* printf("%s ", str); |
|
||||
* } |
|
||||
* printf("\n"); |
|
||||
* return 0; |
|
||||
* } |
|
||||
*/ |
|
||||
int main(int argc, char *argv[]) |
|
||||
{ |
|
||||
/* Expect exactly one argument */ |
|
||||
if (argc != 2) |
|
||||
return 1; |
|
||||
|
|
||||
if (strcmp(argv[1], "depends") == 0) { |
|
||||
return 0; |
|
||||
} |
|
||||
|
|
||||
return 1; |
|
||||
} |
|
@ -1,66 +0,0 @@ |
|||||
/* CC0 license (public domain) - see LICENSE file for details */ |
|
||||
#include <ccan/str/hex/hex.h> |
|
||||
#include <assert.h> |
|
||||
#include <stdio.h> |
|
||||
#include <stdlib.h> |
|
||||
|
|
||||
static bool char_to_hex(unsigned char *val, char c) |
|
||||
{ |
|
||||
if (c >= '0' && c <= '9') { |
|
||||
*val = c - '0'; |
|
||||
return true; |
|
||||
} |
|
||||
if (c >= 'a' && c <= 'f') { |
|
||||
*val = c - 'a' + 10; |
|
||||
return true; |
|
||||
} |
|
||||
if (c >= 'A' && c <= 'F') { |
|
||||
*val = c - 'A' + 10; |
|
||||
return true; |
|
||||
} |
|
||||
return false; |
|
||||
} |
|
||||
|
|
||||
bool hex_decode(const char *str, size_t slen, void *buf, size_t bufsize) |
|
||||
{ |
|
||||
unsigned char v1, v2; |
|
||||
unsigned char *p = buf; |
|
||||
|
|
||||
while (slen > 1) { |
|
||||
if (!char_to_hex(&v1, str[0]) || !char_to_hex(&v2, str[1])) |
|
||||
return false; |
|
||||
if (!bufsize) |
|
||||
return false; |
|
||||
*(p++) = (v1 << 4) | v2; |
|
||||
str += 2; |
|
||||
slen -= 2; |
|
||||
bufsize--; |
|
||||
} |
|
||||
return slen == 0 && bufsize == 0; |
|
||||
} |
|
||||
|
|
||||
static char hexchar(unsigned int val) |
|
||||
{ |
|
||||
if (val < 10) |
|
||||
return '0' + val; |
|
||||
if (val < 16) |
|
||||
return 'a' + val - 10; |
|
||||
abort(); |
|
||||
} |
|
||||
|
|
||||
bool hex_encode(const void *buf, size_t bufsize, char *dest, size_t destsize) |
|
||||
{ |
|
||||
size_t i; |
|
||||
|
|
||||
if (destsize < hex_str_size(bufsize)) |
|
||||
return false; |
|
||||
|
|
||||
for (i = 0; i < bufsize; i++) { |
|
||||
unsigned int c = ((const unsigned char *)buf)[i]; |
|
||||
*(dest++) = hexchar(c >> 4); |
|
||||
*(dest++) = hexchar(c & 0xF); |
|
||||
} |
|
||||
*dest = '\0'; |
|
||||
|
|
||||
return true; |
|
||||
} |
|
@ -1,73 +0,0 @@ |
|||||
/* CC0 (Public domain) - see LICENSE file for details */ |
|
||||
#ifndef CCAN_HEX_H |
|
||||
#define CCAN_HEX_H |
|
||||
#include "config.h" |
|
||||
#include <stdbool.h> |
|
||||
#include <stdlib.h> |
|
||||
|
|
||||
/**
|
|
||||
* hex_decode - Unpack a hex string. |
|
||||
* @str: the hexidecimal string |
|
||||
* @slen: the length of @str |
|
||||
* @buf: the buffer to write the data into |
|
||||
* @bufsize: the length of @buf |
|
||||
* |
|
||||
* Returns false if there are any characters which aren't 0-9, a-f or A-F, |
|
||||
* of the string wasn't the right length for @bufsize. |
|
||||
* |
|
||||
* Example: |
|
||||
* unsigned char data[20]; |
|
||||
* |
|
||||
* if (!hex_decode(argv[1], strlen(argv[1]), data, 20)) |
|
||||
* printf("String is malformed!\n"); |
|
||||
*/ |
|
||||
bool hex_decode(const char *str, size_t slen, void *buf, size_t bufsize); |
|
||||
|
|
||||
/**
|
|
||||
* hex_encode - Create a nul-terminated hex string |
|
||||
* @buf: the buffer to read the data from |
|
||||
* @bufsize: the length of @buf |
|
||||
* @dest: the string to fill |
|
||||
* @destsize: the max size of the string |
|
||||
* |
|
||||
* Returns true if the string, including terminator, fit in @destsize; |
|
||||
* |
|
||||
* Example: |
|
||||
* unsigned char buf[] = { 0x1F, 0x2F }; |
|
||||
* char str[5]; |
|
||||
* |
|
||||
* if (!hex_encode(buf, sizeof(buf), str, sizeof(str))) |
|
||||
* abort(); |
|
||||
*/ |
|
||||
bool hex_encode(const void *buf, size_t bufsize, char *dest, size_t destsize); |
|
||||
|
|
||||
/**
|
|
||||
* hex_str_size - Calculate how big a nul-terminated hex string is |
|
||||
* @bytes: bytes of data to represent |
|
||||
* |
|
||||
* Example: |
|
||||
* unsigned char buf[] = { 0x1F, 0x2F }; |
|
||||
* char str[hex_str_size(sizeof(buf))]; |
|
||||
* |
|
||||
* hex_encode(buf, sizeof(buf), str, sizeof(str)); |
|
||||
*/ |
|
||||
static inline size_t hex_str_size(size_t bytes) |
|
||||
{ |
|
||||
return 2 * bytes + 1; |
|
||||
} |
|
||||
|
|
||||
/**
|
|
||||
* hex_data_size - Calculate how many bytes of data in a hex string |
|
||||
* @strlen: the length of the string (with or without NUL) |
|
||||
* |
|
||||
* Example: |
|
||||
* const char str[] = "1F2F"; |
|
||||
* unsigned char buf[hex_data_size(sizeof(str))]; |
|
||||
* |
|
||||
* hex_decode(str, strlen(str), buf, sizeof(buf)); |
|
||||
*/ |
|
||||
static inline size_t hex_data_size(size_t strlen) |
|
||||
{ |
|
||||
return strlen / 2; |
|
||||
} |
|
||||
#endif /* PETTYCOIN_HEX_H */ |
|
@ -1,42 +0,0 @@ |
|||||
#include <ccan/str/hex/hex.h> |
|
||||
/* Include the C files directly. */ |
|
||||
#include <ccan/str/hex/hex.c> |
|
||||
#include <ccan/tap/tap.h> |
|
||||
#include <string.h> |
|
||||
|
|
||||
int main(void) |
|
||||
{ |
|
||||
const char teststr[] = "0123456789abcdefABCDEF"; |
|
||||
const char bad_teststr[] = "0123456789abcdefABCDEF1O"; |
|
||||
const unsigned char testdata[] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, |
|
||||
0xcd, 0xef, 0xAB, 0xCD, 0xEF }; |
|
||||
unsigned char data[11]; |
|
||||
char str[23]; |
|
||||
size_t i; |
|
||||
|
|
||||
plan_tests(10 + sizeof(str)); |
|
||||
|
|
||||
ok1(hex_str_size(sizeof(testdata)) == sizeof(teststr)); |
|
||||
/* This gives right result with or without nul included */ |
|
||||
ok1(hex_data_size(strlen(teststr)) == sizeof(testdata)); |
|
||||
ok1(hex_data_size(sizeof(teststr)) == sizeof(testdata)); |
|
||||
|
|
||||
ok1(hex_decode(teststr, strlen(teststr), data, sizeof(data))); |
|
||||
ok1(memcmp(data, testdata, sizeof(testdata)) == 0); |
|
||||
ok1(hex_encode(testdata, sizeof(testdata), str, sizeof(str))); |
|
||||
ok1(strcmp(str, "0123456789abcdefabcdef") == 0); |
|
||||
|
|
||||
/* Bad char */ |
|
||||
ok1(!hex_decode(bad_teststr, strlen(bad_teststr), data, sizeof(data))); |
|
||||
/* Bad hex string len */ |
|
||||
ok1(!hex_decode(teststr, strlen(teststr) - 1, data, sizeof(data))); |
|
||||
/* Bad buffer len */ |
|
||||
ok1(!hex_decode(teststr, strlen(teststr), data, sizeof(data) - 1)); |
|
||||
|
|
||||
/* Bad deststring size. */ |
|
||||
for (i = 1; i <= sizeof(str); i++) |
|
||||
ok1(!hex_encode(testdata, sizeof(testdata), str, sizeof(str)-i)); |
|
||||
|
|
||||
/* This exits depending on whether all tests passed */ |
|
||||
return exit_status(); |
|
||||
} |
|
@ -1,61 +0,0 @@ |
|||||
#include "config.h" |
|
||||
#include <stdio.h> |
|
||||
#include <string.h> |
|
||||
|
|
||||
/** |
|
||||
* tap - Test Anything Protocol |
|
||||
* |
|
||||
* The tap package produces simple-to-parse mainly-human-readable test |
|
||||
* output to assist in the writing of test cases. It is based on the |
|
||||
* (now-defunct) libtap, which is based on Perl's CPAN TAP module. Its |
|
||||
* output can be parsed by a harness such as CPAN's Prove. |
|
||||
* |
|
||||
* CCAN testcases are expected to output the TAP format, usually using |
|
||||
* this package. |
|
||||
* |
|
||||
* For more information about TAP, see: |
|
||||
* http://en.wikipedia.org/wiki/Test_Anything_Protocol |
|
||||
* |
|
||||
* Based on the original libtap, Copyright (c) 2004 Nik Clayton. |
|
||||
* |
|
||||
* License: BSD (2 clause) |
|
||||
* |
|
||||
* Example: |
|
||||
* #include <string.h> |
|
||||
* #include <ccan/tap/tap.h> |
|
||||
* |
|
||||
* // Run some simple (but overly chatty) tests on strcmp(). |
|
||||
* int main(int argc, char *argv[]) |
|
||||
* { |
|
||||
* const char a[] = "a", another_a[] = "a"; |
|
||||
* const char b[] = "b"; |
|
||||
* const char ab[] = "ab"; |
|
||||
* |
|
||||
* plan_tests(4); |
|
||||
* diag("Testing different pointers (%p/%p) with same contents", |
|
||||
* a, another_a); |
|
||||
* ok1(strcmp(a, another_a) == 0); |
|
||||
* |
|
||||
* diag("'a' comes before 'b'"); |
|
||||
* ok1(strcmp(a, b) < 0); |
|
||||
* ok1(strcmp(b, a) > 0); |
|
||||
* |
|
||||
* diag("'ab' comes after 'a'"); |
|
||||
* ok1(strcmp(ab, a) > 0); |
|
||||
* return exit_status(); |
|
||||
* } |
|
||||
* |
|
||||
* Maintainer: Rusty Russell <rusty@rustcorp.com.au> |
|
||||
*/ |
|
||||
int main(int argc, char *argv[]) |
|
||||
{ |
|
||||
if (argc != 2) |
|
||||
return 1; |
|
||||
|
|
||||
if (strcmp(argv[1], "depends") == 0) { |
|
||||
printf("ccan/compiler\n"); |
|
||||
return 0; |
|
||||
} |
|
||||
|
|
||||
return 1; |
|
||||
} |
|
@ -1,362 +0,0 @@ |
|||||
.Dd December 20, 2004 |
|
||||
.Os |
|
||||
.Dt TAP 3 |
|
||||
.Sh NAME |
|
||||
.Nm tap |
|
||||
.Nd write tests that implement the Test Anything Protocol |
|
||||
.Sh SYNOPSIS |
|
||||
.In tap.h |
|
||||
.Sh DESCRIPTION |
|
||||
The |
|
||||
.Nm |
|
||||
library provides functions for writing test scripts that produce output |
|
||||
consistent with the Test Anything Protocol. A test harness that parses |
|
||||
this protocol can run these tests and produce useful reports indicating |
|
||||
their success or failure. |
|
||||
.Ss PRINTF STRINGS |
|
||||
In the descriptions that follow, for any function that takes as the |
|
||||
last two parameters |
|
||||
.Dq Fa const char * , Fa ... |
|
||||
it can be assumed that the |
|
||||
.Fa const char * |
|
||||
is a |
|
||||
.Fn printf |
|
||||
-like format string, and the optional arguments are values to be placed |
|
||||
in that string. |
|
||||
.Ss TEST PLANS |
|
||||
.Bl -tag -width indent |
|
||||
.It Xo |
|
||||
.Ft void |
|
||||
.Fn plan_tests "unsigned int" |
|
||||
.Xc |
|
||||
.It Xo |
|
||||
.Ft void |
|
||||
.Fn plan_no_plan "void" |
|
||||
.Xc |
|
||||
.It Xo |
|
||||
.Ft void |
|
||||
.Fn plan_skip_all "const char *" "..." |
|
||||
.Xc |
|
||||
.El |
|
||||
.Pp |
|
||||
You must first specify a test plan. This indicates how many tests you |
|
||||
intend to run, and allows the test harness to notice if any tests were |
|
||||
missed, or if the test program exited prematurely. |
|
||||
.Pp |
|
||||
To do this, use |
|
||||
.Fn plan_tests . |
|
||||
The function will cause your program to exit prematurely if you specify |
|
||||
0 tests. |
|
||||
.Pp |
|
||||
In some situations you may not know how many tests you will be running, or |
|
||||
you are developing your test program, and do not want to update the |
|
||||
.Fn plan_tests |
|
||||
parameter every time you make a change. For those situations use |
|
||||
.Fn plan_no_plan . |
|
||||
It indicates to the test harness that an indeterminate number |
|
||||
of tests will be run. |
|
||||
.Pp |
|
||||
Both |
|
||||
.Fn plan_tests |
|
||||
and |
|
||||
.Fn plan_no_plan |
|
||||
will cause your test program to exit prematurely with a diagnostic |
|
||||
message if they are called more than once. |
|
||||
.Pp |
|
||||
If your test program detects at run time that some required functionality |
|
||||
is missing (for example, it relies on a database connection which is not |
|
||||
present, or a particular configuration option that has not been included |
|
||||
in the running kernel) use |
|
||||
.Fn plan_skip_all , |
|
||||
passing as parameters a string to display indicating the reason for skipping |
|
||||
the tests. |
|
||||
.Ss SIMPLE TESTS |
|
||||
.Bl -tag -width indent |
|
||||
.It Xo |
|
||||
.Ft unsigned int |
|
||||
.Fn ok "expression" "const char *" "..." |
|
||||
.Xc |
|
||||
.It Xo |
|
||||
.Ft unsigned int |
|
||||
.Fn ok1 "expression" |
|
||||
.Xc |
|
||||
.It Xo |
|
||||
.Ft unsigned int |
|
||||
.Fn pass "const char *" "..." |
|
||||
.Xc |
|
||||
.It Xo |
|
||||
.Ft unsigned int |
|
||||
.Fn fail "const char *" "..." |
|
||||
.Xc |
|
||||
.El |
|
||||
.Pp |
|
||||
Tests are implemented as expressions checked by calls to the |
|
||||
.Fn ok |
|
||||
and |
|
||||
.Fn ok1 |
|
||||
macros. In both cases |
|
||||
.Fa expression |
|
||||
should evaluate to true if the test succeeded. |
|
||||
.Pp |
|
||||
.Fn ok |
|
||||
allows you to specify a name, or comment, describing the test which will |
|
||||
be included in the output. |
|
||||
.Fn ok1 |
|
||||
is for those times when the expression to be tested is self |
|
||||
explanatory and does not need an associated comment. In those cases |
|
||||
the test expression becomes the comment. |
|
||||
.Pp |
|
||||
These four calls are equivalent: |
|
||||
.Bd -literal -offset indent |
|
||||
int i = 5; |
|
||||
|
|
||||
ok(i == 5, "i equals 5"); /* Overly verbose */ |
|
||||
ok(i == 5, "i equals %d", i); /* Just to demonstrate printf-like |
|
||||
behaviour of the test name */ |
|
||||
ok(i == 5, "i == 5"); /* Needless repetition */ |
|
||||
ok1(i == 5); /* Just right */ |
|
||||
.Ed |
|
||||
.Pp |
|
||||
It is good practice to ensure that the test name describes the meaning |
|
||||
behind the test rather than what you are testing. Viz |
|
||||
.Bd -literal -offset indent |
|
||||
ok(db != NULL, "db is not NULL"); /* Not bad, but */ |
|
||||
ok(db != NULL, "Database conn. succeeded"); /* this is better */ |
|
||||
.Ed |
|
||||
.Pp |
|
||||
.Fn ok |
|
||||
and |
|
||||
.Fn ok1 |
|
||||
return 1 if the expression evaluated to true, and 0 if it evaluated to |
|
||||
false. This lets you chain calls from |
|
||||
.Fn ok |
|
||||
to |
|
||||
.Fn diag |
|
||||
to only produce diagnostic output if the test failed. For example, this |
|
||||
code will include diagnostic information about why the database connection |
|
||||
failed, but only if the test failed. |
|
||||
.Bd -literal -offset indent |
|
||||
if (!ok(db != NULL, "Database conn. succeeded")) { |
|
||||
diag("Database error code: %d", dberrno); |
|
||||
} |
|
||||
.Ed |
|
||||
.Pp |
|
||||
You also have |
|
||||
.Fn pass |
|
||||
and |
|
||||
.Fn fail . |
|
||||
From the Test::More documentation: |
|
||||
.Bd -literal -offset indent |
|
||||
Sometimes you just want to say that the tests have passed. |
|
||||
Usually the case is you've got some complicated condition |
|
||||
that is difficult to wedge into an ok(). In this case, |
|
||||
you can simply use pass() (to declare the test ok) or fail |
|
||||
(for not ok). |
|
||||
|
|
||||
Use these very, very, very sparingly. |
|
||||
.Ed |
|
||||
.Pp |
|
||||
These are synonyms for ok(1, ...) and ok(0, ...). |
|
||||
.Ss SKIPPING TESTS |
|
||||
.Bl -tag -width indent |
|
||||
.It Xo |
|
||||
.Ft void |
|
||||
.Fn skip "unsigned int" "const char *" "..." |
|
||||
.Xc |
|
||||
.It Xo |
|
||||
.Fn skip_if "expression" "unsigned int" "const char *" "..." |
|
||||
.Xc |
|
||||
.El |
|
||||
.Pp |
|
||||
Sets of tests can be skipped. Ordinarily you would do this because |
|
||||
the test can't be run in this particular testing environment. |
|
||||
.Pp |
|
||||
For example, suppose some tests should be run as root. If the test is |
|
||||
not being run as root then the tests should be skipped. In this |
|
||||
implementation, skipped tests are flagged as being ok, with a special |
|
||||
message indicating that they were skipped. It is your responsibility |
|
||||
to ensure that the number of tests skipped (the first parameter to |
|
||||
.Fn skip ) |
|
||||
is correct for the number of tests to skip. |
|
||||
.Pp |
|
||||
One way of implementing this is with a |
|
||||
.Dq do { } while(0); |
|
||||
loop, or an |
|
||||
.Dq if( ) { } else { } |
|
||||
construct, to ensure that there are no additional side effects from the |
|
||||
skipped tests. |
|
||||
.Bd -literal -offset indent |
|
||||
if(getuid() != 0) { |
|
||||
skip(1, "because test only works as root"); |
|
||||
} else { |
|
||||
ok(do_something_as_root() == 0, "Did something as root"); |
|
||||
} |
|
||||
.Ed |
|
||||
.Pp |
|
||||
A convenient macro is provided to assist with this. The previous example could |
|
||||
be re-written as follows. |
|
||||
.Bd -literal -offset indent |
|
||||
skip_if(getuid() != 0, 1, "because test only works as root") { |
|
||||
ok(do_something_as_root() == 0, "Did something as root"); |
|
||||
} |
|
||||
.Ed |
|
||||
.Ss MARKING TESTS AS Dq TODO |
|
||||
.Bl -tag -width indent |
|
||||
.It Xo |
|
||||
.Ft void |
|
||||
.Fn todo_start "const char *" "..." |
|
||||
.Xc |
|
||||
.It Xo |
|
||||
.Ft void |
|
||||
.Fn todo_end "void" |
|
||||
.Xc |
|
||||
.El |
|
||||
.Pp |
|
||||
Sets of tests can be flagged as being |
|
||||
.Dq TODO . |
|
||||
These are tests that you expect to fail, probably because you haven't |
|
||||
fixed a bug, or finished a new feature yet. These tests will still be |
|
||||
run, but with additional output that indicates that they are expected |
|
||||
to fail. Should a test start to succeed unexpectedly, tools like |
|
||||
.Xr prove 1 |
|
||||
will indicate this, and you can move the test out of the todo |
|
||||
block. This is much more useful than simply commenting out (or |
|
||||
.Dq #ifdef 0 ... #endif ) |
|
||||
the tests. |
|
||||
.Bd -literal -offset indent |
|
||||
todo_start("dwim() not returning true yet"); |
|
||||
|
|
||||
ok(dwim(), "Did what the user wanted"); |
|
||||
|
|
||||
todo_end(); |
|
||||
.Ed |
|
||||
.Pp |
|
||||
Should |
|
||||
.Fn dwim |
|
||||
ever start succeeding you will know about it as soon as you run the |
|
||||
tests. Note that |
|
||||
.Em unlike |
|
||||
the |
|
||||
.Fn skip_* |
|
||||
family, additional code between |
|
||||
.Fn todo_start |
|
||||
and |
|
||||
.Fn todo_end |
|
||||
.Em is |
|
||||
executed. |
|
||||
.Ss SKIP vs. TODO |
|
||||
From the Test::More documentation; |
|
||||
.Bd -literal -offset indent |
|
||||
If it's something the user might not be able to do, use SKIP. |
|
||||
This includes optional modules that aren't installed, running |
|
||||
under an OS that doesn't have some feature (like fork() or |
|
||||
symlinks), or maybe you need an Internet connection and one |
|
||||
isn't available. |
|
||||
|
|
||||
If it's something the programmer hasn't done yet, use TODO. |
|
||||
This is for any code you haven't written yet, or bugs you have |
|
||||
yet to fix, but want to put tests in your testing script |
|
||||
(always a good idea). |
|
||||
.Ed |
|
||||
.Ss DIAGNOSTIC OUTPUT |
|
||||
.Bl -tag -width indent |
|
||||
.It Xo |
|
||||
.Fr int |
|
||||
.Fn diag "const char *" "..." |
|
||||
.Xc |
|
||||
.El |
|
||||
.Pp |
|
||||
If your tests need to produce diagnostic output, use |
|
||||
.Fn diag . |
|
||||
It ensures that the output will not be considered by the TAP test harness. |
|
||||
.Fn diag |
|
||||
adds the necessary trailing |
|
||||
.Dq \en |
|
||||
for you. |
|
||||
It returns the number of characters written. |
|
||||
.Bd -literal -offset indent |
|
||||
diag("Expected return code 0, got return code %d", rcode); |
|
||||
.Ed |
|
||||
.Ss EXIT STATUS |
|
||||
.Bl -tag -width indent |
|
||||
.It Xo |
|
||||
.Fr int |
|
||||
.Fn exit_status void |
|
||||
.Xc |
|
||||
.El |
|
||||
.Pp |
|
||||
For maximum compatability your test program should return a particular |
|
||||
exit code. This is calculated by |
|
||||
.Fn exit_status |
|
||||
so it is sufficient to always return from |
|
||||
.Fn main |
|
||||
with either |
|
||||
.Dq return exit_status(); |
|
||||
or |
|
||||
.Dq exit(exit_status()); |
|
||||
as appropriate. |
|
||||
.Sh EXAMPLES |
|
||||
The |
|
||||
.Pa tests |
|
||||
directory in the source distribution contains numerous tests of |
|
||||
.Nm |
|
||||
functionality, written using |
|
||||
.Nm . |
|
||||
Examine them for examples of how to construct test suites. |
|
||||
.Sh COMPATABILITY |
|
||||
.Nm |
|
||||
strives to be compatible with the Perl Test::More and Test::Harness |
|
||||
modules. The test suite verifies that |
|
||||
.Nm |
|
||||
is bug-for-bug compatible with their behaviour. This is why some |
|
||||
functions which would more naturally return nothing return constant |
|
||||
values. |
|
||||
.Pp |
|
||||
If the |
|
||||
.Lb libpthread |
|
||||
is found at compile time, |
|
||||
.Nm |
|
||||
.Em should |
|
||||
be thread safe. Indications to the contrary (and test cases that expose |
|
||||
incorrect behaviour) are very welcome. |
|
||||
.Sh SEE ALSO |
|
||||
.Xr Test::More 1 , |
|
||||
.Xr Test::Harness 1 , |
|
||||
.Xr prove 1 |
|
||||
.Sh STANDARDS |
|
||||
.Nm |
|
||||
requires a |
|
||||
.St -isoC-99 |
|
||||
compiler. Some of the |
|
||||
.Nm |
|
||||
functionality is implemented as variadic macros, and that functionality |
|
||||
was not formally codified until C99. Patches to use |
|
||||
.Nm |
|
||||
with earlier compilers that have their own implementation of variadic |
|
||||
macros will be gratefully received. |
|
||||
.Sh HISTORY |
|
||||
.Nm |
|
||||
was written to help improve the quality and coverage of the FreeBSD |
|
||||
regression test suite, and released in the hope that others find it |
|
||||
a useful tool to help improve the quality of their code. |
|
||||
.Sh AUTHORS |
|
||||
.An "Nik Clayton" Aq nik@ngo.org.uk , |
|
||||
.Aq nik@FreeBSD.org |
|
||||
.Pp |
|
||||
.Nm |
|
||||
would not exist without the efforts of |
|
||||
.An "Michael G Schwern" Aq schqern@pobox.com , |
|
||||
.An "Andy Lester" Aq andy@petdance.com , |
|
||||
and the countless others who have worked on the Perl QA programme. |
|
||||
.Sh BUGS |
|
||||
Ideally, running the tests would have no side effects on the behaviour |
|
||||
of the application you are testing. However, it is not always possible |
|
||||
to avoid them. The following side effects of using |
|
||||
.Nm |
|
||||
are known. |
|
||||
.Bl -bullet -offset indent |
|
||||
.It |
|
||||
stdout is set to unbuffered mode after calling any of the |
|
||||
.Fn plan_* |
|
||||
functions. |
|
||||
.El |
|
@ -1,457 +0,0 @@ |
|||||
/*-
|
|
||||
* Copyright (c) 2004 Nik Clayton |
|
||||
* All rights reserved. |
|
||||
* |
|
||||
* Redistribution and use in source and binary forms, with or without |
|
||||
* modification, are permitted provided that the following conditions |
|
||||
* are met: |
|
||||
* 1. Redistributions of source code must retain the above copyright |
|
||||
* notice, this list of conditions and the following disclaimer. |
|
||||
* 2. Redistributions in binary form must reproduce the above copyright |
|
||||
* notice, this list of conditions and the following disclaimer in the |
|
||||
* documentation and/or other materials provided with the distribution. |
|
||||
* |
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND |
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE |
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
||||
* SUCH DAMAGE. |
|
||||
*/ |
|
||||
#include "config.h" |
|
||||
#include <ctype.h> |
|
||||
#include <stdarg.h> |
|
||||
#include <stdio.h> |
|
||||
#include <stdlib.h> |
|
||||
#include <unistd.h> |
|
||||
|
|
||||
#include "tap.h" |
|
||||
|
|
||||
static int no_plan = 0; |
|
||||
static int skip_all = 0; |
|
||||
static int have_plan = 0; |
|
||||
static unsigned int test_count = 0; /* Number of tests that have been run */ |
|
||||
static unsigned int e_tests = 0; /* Expected number of tests to run */ |
|
||||
static unsigned int failures = 0; /* Number of tests that failed */ |
|
||||
static char *todo_msg = NULL; |
|
||||
static const char *todo_msg_fixed = "libtap malloc issue"; |
|
||||
static int todo = 0; |
|
||||
static int test_died = 0; |
|
||||
static int test_pid; |
|
||||
|
|
||||
/* Encapsulate the pthread code in a conditional. In the absence of
|
|
||||
libpthread the code does nothing. |
|
||||
|
|
||||
If you have multiple threads calling ok() etc. at the same time you would |
|
||||
need this, but in that case your test numbers will be random and I'm not |
|
||||
sure it makes sense. --RR |
|
||||
*/ |
|
||||
#ifdef WANT_PTHREAD |
|
||||
#include <pthread.h> |
|
||||
static pthread_mutex_t M = PTHREAD_MUTEX_INITIALIZER; |
|
||||
# define LOCK pthread_mutex_lock(&M) |
|
||||
# define UNLOCK pthread_mutex_unlock(&M) |
|
||||
#else |
|
||||
# define LOCK |
|
||||
# define UNLOCK |
|
||||
#endif |
|
||||
|
|
||||
static void |
|
||||
_expected_tests(unsigned int tests) |
|
||||
{ |
|
||||
|
|
||||
printf("1..%d\n", tests); |
|
||||
e_tests = tests; |
|
||||
} |
|
||||
|
|
||||
static void |
|
||||
diagv(const char *fmt, va_list ap) |
|
||||
{ |
|
||||
fputs("# ", stdout); |
|
||||
vfprintf(stdout, fmt, ap); |
|
||||
fputs("\n", stdout); |
|
||||
} |
|
||||
|
|
||||
static void |
|
||||
_diag(const char *fmt, ...) |
|
||||
{ |
|
||||
va_list ap; |
|
||||
va_start(ap, fmt); |
|
||||
diagv(fmt, ap); |
|
||||
va_end(ap); |
|
||||
} |
|
||||
|
|
||||
/*
|
|
||||
* Generate a test result. |
|
||||
* |
|
||||
* ok -- boolean, indicates whether or not the test passed. |
|
||||
* test_name -- the name of the test, may be NULL |
|
||||
* test_comment -- a comment to print afterwards, may be NULL |
|
||||
*/ |
|
||||
unsigned int |
|
||||
_gen_result(int ok, const char *func, const char *file, unsigned int line, |
|
||||
const char *test_name, ...) |
|
||||
{ |
|
||||
va_list ap; |
|
||||
char *local_test_name = NULL; |
|
||||
char *c; |
|
||||
int name_is_digits; |
|
||||
|
|
||||
LOCK; |
|
||||
|
|
||||
test_count++; |
|
||||
|
|
||||
/* Start by taking the test name and performing any printf()
|
|
||||
expansions on it */ |
|
||||
if(test_name != NULL) { |
|
||||
va_start(ap, test_name); |
|
||||
if (vasprintf(&local_test_name, test_name, ap) < 0) |
|
||||
local_test_name = NULL; |
|
||||
va_end(ap); |
|
||||
|
|
||||
/* Make sure the test name contains more than digits
|
|
||||
and spaces. Emit an error message and exit if it |
|
||||
does */ |
|
||||
if(local_test_name) { |
|
||||
name_is_digits = 1; |
|
||||
for(c = local_test_name; *c != '\0'; c++) { |
|
||||
if(!isdigit((unsigned char)*c) |
|
||||
&& !isspace((unsigned char)*c)) { |
|
||||
name_is_digits = 0; |
|
||||
break; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
if(name_is_digits) { |
|
||||
_diag(" You named your test '%s'. You shouldn't use numbers for your test names.", local_test_name); |
|
||||
_diag(" Very confusing."); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
if(!ok) { |
|
||||
printf("not "); |
|
||||
failures++; |
|
||||
} |
|
||||
|
|
||||
printf("ok %d", test_count); |
|
||||
|
|
||||
if(test_name != NULL) { |
|
||||
printf(" - "); |
|
||||
|
|
||||
/* Print the test name, escaping any '#' characters it
|
|
||||
might contain */ |
|
||||
if(local_test_name != NULL) { |
|
||||
flockfile(stdout); |
|
||||
for(c = local_test_name; *c != '\0'; c++) { |
|
||||
if(*c == '#') |
|
||||
fputc('\\', stdout); |
|
||||
fputc((int)*c, stdout); |
|
||||
} |
|
||||
funlockfile(stdout); |
|
||||
} else { /* vasprintf() failed, use a fixed message */ |
|
||||
printf("%s", todo_msg_fixed); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
/* If we're in a todo_start() block then flag the test as being
|
|
||||
TODO. todo_msg should contain the message to print at this |
|
||||
point. If it's NULL then asprintf() failed, and we should |
|
||||
use the fixed message. |
|
||||
|
|
||||
This is not counted as a failure, so decrement the counter if |
|
||||
the test failed. */ |
|
||||
if(todo) { |
|
||||
printf(" # TODO %s", todo_msg ? todo_msg : todo_msg_fixed); |
|
||||
if(!ok) |
|
||||
failures--; |
|
||||
} |
|
||||
|
|
||||
printf("\n"); |
|
||||
|
|
||||
if(!ok) |
|
||||
_diag(" Failed %stest (%s:%s() at line %d)", |
|
||||
todo ? "(TODO) " : "", file, func, line); |
|
||||
|
|
||||
free(local_test_name); |
|
||||
|
|
||||
UNLOCK; |
|
||||
|
|
||||
if (!ok && tap_fail_callback) |
|
||||
tap_fail_callback(); |
|
||||
|
|
||||
/* We only care (when testing) that ok is positive, but here we
|
|
||||
specifically only want to return 1 or 0 */ |
|
||||
return ok ? 1 : 0; |
|
||||
} |
|
||||
|
|
||||
/*
|
|
||||
* Cleanup at the end of the run, produce any final output that might be |
|
||||
* required. |
|
||||
*/ |
|
||||
static void |
|
||||
_cleanup(void) |
|
||||
{ |
|
||||
/* If we forked, don't do cleanup in child! */ |
|
||||
if (getpid() != test_pid) |
|
||||
return; |
|
||||
|
|
||||
LOCK; |
|
||||
|
|
||||
/* If plan_no_plan() wasn't called, and we don't have a plan,
|
|
||||
and we're not skipping everything, then something happened |
|
||||
before we could produce any output */ |
|
||||
if(!no_plan && !have_plan && !skip_all) { |
|
||||
_diag("Looks like your test died before it could output anything."); |
|
||||
UNLOCK; |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
if(test_died) { |
|
||||
_diag("Looks like your test died just after %d.", test_count); |
|
||||
UNLOCK; |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
/* No plan provided, but now we know how many tests were run, and can
|
|
||||
print the header at the end */ |
|
||||
if(!skip_all && (no_plan || !have_plan)) { |
|
||||
printf("1..%d\n", test_count); |
|
||||
} |
|
||||
|
|
||||
if((have_plan && !no_plan) && e_tests < test_count) { |
|
||||
_diag("Looks like you planned %d tests but ran %d extra.", |
|
||||
e_tests, test_count - e_tests); |
|
||||
UNLOCK; |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
if((have_plan || !no_plan) && e_tests > test_count) { |
|
||||
_diag("Looks like you planned %d tests but only ran %d.", |
|
||||
e_tests, test_count); |
|
||||
if(failures) { |
|
||||
_diag("Looks like you failed %d tests of %d run.", |
|
||||
failures, test_count); |
|
||||
} |
|
||||
UNLOCK; |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
if(failures) |
|
||||
_diag("Looks like you failed %d tests of %d.", |
|
||||
failures, test_count); |
|
||||
|
|
||||
UNLOCK; |
|
||||
} |
|
||||
|
|
||||
/*
|
|
||||
* Initialise the TAP library. Will only do so once, however many times it's |
|
||||
* called. |
|
||||
*/ |
|
||||
static void |
|
||||
_tap_init(void) |
|
||||
{ |
|
||||
static int run_once = 0; |
|
||||
|
|
||||
if(!run_once) { |
|
||||
test_pid = getpid(); |
|
||||
atexit(_cleanup); |
|
||||
|
|
||||
/* stdout needs to be unbuffered so that the output appears
|
|
||||
in the same place relative to stderr output as it does |
|
||||
with Test::Harness */ |
|
||||
// setbuf(stdout, 0);
|
|
||||
run_once = 1; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
/*
|
|
||||
* Note that there's no plan. |
|
||||
*/ |
|
||||
void |
|
||||
plan_no_plan(void) |
|
||||
{ |
|
||||
|
|
||||
LOCK; |
|
||||
|
|
||||
_tap_init(); |
|
||||
|
|
||||
if(have_plan != 0) { |
|
||||
fprintf(stderr, "You tried to plan twice!\n"); |
|
||||
test_died = 1; |
|
||||
UNLOCK; |
|
||||
exit(255); |
|
||||
} |
|
||||
|
|
||||
have_plan = 1; |
|
||||
no_plan = 1; |
|
||||
|
|
||||
UNLOCK; |
|
||||
} |
|
||||
|
|
||||
/*
|
|
||||
* Note that the plan is to skip all tests |
|
||||
*/ |
|
||||
void |
|
||||
plan_skip_all(const char *reason) |
|
||||
{ |
|
||||
|
|
||||
LOCK; |
|
||||
|
|
||||
_tap_init(); |
|
||||
|
|
||||
skip_all = 1; |
|
||||
|
|
||||
printf("1..0"); |
|
||||
|
|
||||
if(reason != NULL) |
|
||||
printf(" # Skip %s", reason); |
|
||||
|
|
||||
printf("\n"); |
|
||||
|
|
||||
UNLOCK; |
|
||||
} |
|
||||
|
|
||||
/*
|
|
||||
* Note the number of tests that will be run. |
|
||||
*/ |
|
||||
void |
|
||||
plan_tests(unsigned int tests) |
|
||||
{ |
|
||||
|
|
||||
LOCK; |
|
||||
|
|
||||
_tap_init(); |
|
||||
|
|
||||
if(have_plan != 0) { |
|
||||
fprintf(stderr, "You tried to plan twice!\n"); |
|
||||
test_died = 1; |
|
||||
UNLOCK; |
|
||||
exit(255); |
|
||||
} |
|
||||
|
|
||||
if(tests == 0) { |
|
||||
fprintf(stderr, "You said to run 0 tests! You've got to run something.\n"); |
|
||||
test_died = 1; |
|
||||
UNLOCK; |
|
||||
exit(255); |
|
||||
} |
|
||||
|
|
||||
have_plan = 1; |
|
||||
|
|
||||
_expected_tests(tests); |
|
||||
|
|
||||
UNLOCK; |
|
||||
} |
|
||||
|
|
||||
void |
|
||||
diag(const char *fmt, ...) |
|
||||
{ |
|
||||
va_list ap; |
|
||||
|
|
||||
LOCK; |
|
||||
|
|
||||
va_start(ap, fmt); |
|
||||
diagv(fmt, ap); |
|
||||
va_end(ap); |
|
||||
|
|
||||
UNLOCK; |
|
||||
} |
|
||||
|
|
||||
void |
|
||||
skip(unsigned int n, const char *fmt, ...) |
|
||||
{ |
|
||||
va_list ap; |
|
||||
char *skip_msg; |
|
||||
|
|
||||
LOCK; |
|
||||
|
|
||||
va_start(ap, fmt); |
|
||||
if (vasprintf(&skip_msg, fmt, ap) < 0) |
|
||||
skip_msg = NULL; |
|
||||
va_end(ap); |
|
||||
|
|
||||
while(n-- > 0) { |
|
||||
test_count++; |
|
||||
printf("ok %d # skip %s\n", test_count, |
|
||||
skip_msg != NULL ? |
|
||||
skip_msg : "libtap():malloc() failed"); |
|
||||
} |
|
||||
|
|
||||
free(skip_msg); |
|
||||
|
|
||||
UNLOCK; |
|
||||
} |
|
||||
|
|
||||
void |
|
||||
todo_start(const char *fmt, ...) |
|
||||
{ |
|
||||
va_list ap; |
|
||||
|
|
||||
LOCK; |
|
||||
|
|
||||
va_start(ap, fmt); |
|
||||
if (vasprintf(&todo_msg, fmt, ap) < 0) |
|
||||
todo_msg = NULL; |
|
||||
va_end(ap); |
|
||||
|
|
||||
todo = 1; |
|
||||
|
|
||||
UNLOCK; |
|
||||
} |
|
||||
|
|
||||
void |
|
||||
todo_end(void) |
|
||||
{ |
|
||||
|
|
||||
LOCK; |
|
||||
|
|
||||
todo = 0; |
|
||||
free(todo_msg); |
|
||||
|
|
||||
UNLOCK; |
|
||||
} |
|
||||
|
|
||||
static int |
|
||||
exit_status_(void) |
|
||||
{ |
|
||||
int r; |
|
||||
|
|
||||
LOCK; |
|
||||
|
|
||||
/* If there's no plan, just return the number of failures */ |
|
||||
if(no_plan || !have_plan) { |
|
||||
UNLOCK; |
|
||||
return failures; |
|
||||
} |
|
||||
|
|
||||
/* Ran too many tests? Return the number of tests that were run
|
|
||||
that shouldn't have been */ |
|
||||
if(e_tests < test_count) { |
|
||||
r = test_count - e_tests; |
|
||||
UNLOCK; |
|
||||
return r; |
|
||||
} |
|
||||
|
|
||||
/* Return the number of tests that failed + the number of tests
|
|
||||
that weren't run */ |
|
||||
r = failures + e_tests - test_count; |
|
||||
UNLOCK; |
|
||||
|
|
||||
return r; |
|
||||
} |
|
||||
|
|
||||
int |
|
||||
exit_status(void) |
|
||||
{ |
|
||||
int r = exit_status_(); |
|
||||
if (r > 255) |
|
||||
r = 255; |
|
||||
return r; |
|
||||
} |
|
@ -1,251 +0,0 @@ |
|||||
#ifndef CCAN_TAP_H |
|
||||
#define CCAN_TAP_H |
|
||||
/*-
|
|
||||
* Copyright (c) 2004 Nik Clayton |
|
||||
* All rights reserved. |
|
||||
* |
|
||||
* Redistribution and use in source and binary forms, with or without |
|
||||
* modification, are permitted provided that the following conditions |
|
||||
* are met: |
|
||||
* 1. Redistributions of source code must retain the above copyright |
|
||||
* notice, this list of conditions and the following disclaimer. |
|
||||
* 2. Redistributions in binary form must reproduce the above copyright |
|
||||
* notice, this list of conditions and the following disclaimer in the |
|
||||
* documentation and/or other materials provided with the distribution. |
|
||||
* |
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND |
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE |
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
||||
* SUCH DAMAGE. |
|
||||
*/ |
|
||||
#include <ccan/compiler/compiler.h> |
|
||||
|
|
||||
/**
|
|
||||
* plan_tests - announce the number of tests you plan to run |
|
||||
* @tests: the number of tests |
|
||||
* |
|
||||
* This should be the first call in your test program: it allows tracing |
|
||||
* of failures which mean that not all tests are run. |
|
||||
* |
|
||||
* If you don't know how many tests will actually be run, assume all of them |
|
||||
* and use skip() if you don't actually run some tests. |
|
||||
* |
|
||||
* Example: |
|
||||
* plan_tests(13); |
|
||||
*/ |
|
||||
void plan_tests(unsigned int tests); |
|
||||
|
|
||||
/**
|
|
||||
* ok1 - Simple conditional test |
|
||||
* @e: the expression which we expect to be true. |
|
||||
* |
|
||||
* This is the simplest kind of test: if the expression is true, the |
|
||||
* test passes. The name of the test which is printed will simply be |
|
||||
* file name, line number, and the expression itself. |
|
||||
* |
|
||||
* Example: |
|
||||
* ok1(somefunc() == 1); |
|
||||
*/ |
|
||||
# define ok1(e) ((e) ? \ |
|
||||
_gen_result(1, __func__, __FILE__, __LINE__, "%s", #e) : \ |
|
||||
_gen_result(0, __func__, __FILE__, __LINE__, "%s", #e)) |
|
||||
|
|
||||
/**
|
|
||||
* ok - Conditional test with a name |
|
||||
* @e: the expression which we expect to be true. |
|
||||
* @...: the printf-style name of the test. |
|
||||
* |
|
||||
* If the expression is true, the test passes. The name of the test will be |
|
||||
* the filename, line number, and the printf-style string. This can be clearer |
|
||||
* than simply the expression itself. |
|
||||
* |
|
||||
* Example: |
|
||||
* ok1(somefunc() == 1); |
|
||||
* ok(somefunc() == 0, "Second somefunc() should fail"); |
|
||||
*/ |
|
||||
# define ok(e, ...) ((e) ? \ |
|
||||
_gen_result(1, __func__, __FILE__, __LINE__, \ |
|
||||
__VA_ARGS__) : \ |
|
||||
_gen_result(0, __func__, __FILE__, __LINE__, \ |
|
||||
__VA_ARGS__)) |
|
||||
|
|
||||
/**
|
|
||||
* pass - Note that a test passed |
|
||||
* @...: the printf-style name of the test. |
|
||||
* |
|
||||
* For complicated code paths, it can be easiest to simply call pass() in one |
|
||||
* branch and fail() in another. |
|
||||
* |
|
||||
* Example: |
|
||||
* int x = somefunc(); |
|
||||
* if (x > 0) |
|
||||
* pass("somefunc() returned a valid value"); |
|
||||
* else |
|
||||
* fail("somefunc() returned an invalid value"); |
|
||||
*/ |
|
||||
# define pass(...) ok(1, __VA_ARGS__) |
|
||||
|
|
||||
/**
|
|
||||
* fail - Note that a test failed |
|
||||
* @...: the printf-style name of the test. |
|
||||
* |
|
||||
* For complicated code paths, it can be easiest to simply call pass() in one |
|
||||
* branch and fail() in another. |
|
||||
*/ |
|
||||
# define fail(...) ok(0, __VA_ARGS__) |
|
||||
|
|
||||
/* I don't find these to be useful. */ |
|
||||
# define skip_if(cond, n, ...) \ |
|
||||
if (cond) skip((n), __VA_ARGS__); \ |
|
||||
else |
|
||||
|
|
||||
# define skip_start(test, n, ...) \ |
|
||||
do { \ |
|
||||
if((test)) { \ |
|
||||
skip(n, __VA_ARGS__); \ |
|
||||
continue; \ |
|
||||
} |
|
||||
|
|
||||
# define skip_end } while(0) |
|
||||
|
|
||||
unsigned int _gen_result(int, const char *, const char *, unsigned int, |
|
||||
const char *, ...) PRINTF_FMT(5, 6); |
|
||||
|
|
||||
/**
|
|
||||
* diag - print a diagnostic message (use instead of printf/fprintf) |
|
||||
* @fmt: the format of the printf-style message |
|
||||
* |
|
||||
* diag ensures that the output will not be considered to be a test |
|
||||
* result by the TAP test harness. It will append '\n' for you. |
|
||||
* |
|
||||
* Example: |
|
||||
* diag("Now running complex tests"); |
|
||||
*/ |
|
||||
void diag(const char *fmt, ...) PRINTF_FMT(1, 2); |
|
||||
|
|
||||
/**
|
|
||||
* skip - print a diagnostic message (use instead of printf/fprintf) |
|
||||
* @n: number of tests you're skipping. |
|
||||
* @fmt: the format of the reason you're skipping the tests. |
|
||||
* |
|
||||
* Sometimes tests cannot be run because the test system lacks some feature: |
|
||||
* you should explicitly document that you're skipping tests using skip(). |
|
||||
* |
|
||||
* From the Test::More documentation: |
|
||||
* If it's something the user might not be able to do, use SKIP. This |
|
||||
* includes optional modules that aren't installed, running under an OS that |
|
||||
* doesn't have some feature (like fork() or symlinks), or maybe you need an |
|
||||
* Internet connection and one isn't available. |
|
||||
* |
|
||||
* Example: |
|
||||
* #ifdef HAVE_SOME_FEATURE |
|
||||
* ok1(somefunc()); |
|
||||
* #else |
|
||||
* skip(1, "Don't have SOME_FEATURE"); |
|
||||
* #endif |
|
||||
*/ |
|
||||
void skip(unsigned int n, const char *fmt, ...) PRINTF_FMT(2, 3); |
|
||||
|
|
||||
/**
|
|
||||
* todo_start - mark tests that you expect to fail. |
|
||||
* @fmt: the reason they currently fail. |
|
||||
* |
|
||||
* It's extremely useful to write tests before you implement the matching fix |
|
||||
* or features: surround these tests by todo_start()/todo_end(). These tests |
|
||||
* will still be run, but with additional output that indicates that they are |
|
||||
* expected to fail. |
|
||||
* |
|
||||
* This way, should a test start to succeed unexpectedly, tools like prove(1) |
|
||||
* will indicate this and you can move the test out of the todo block. This |
|
||||
* is much more useful than simply commenting out (or '#if 0') the tests. |
|
||||
* |
|
||||
* From the Test::More documentation: |
|
||||
* If it's something the programmer hasn't done yet, use TODO. This is for |
|
||||
* any code you haven't written yet, or bugs you have yet to fix, but want to |
|
||||
* put tests in your testing script (always a good idea). |
|
||||
* |
|
||||
* Example: |
|
||||
* static bool dwim(void) |
|
||||
* { |
|
||||
* return false; // NYI
|
|
||||
* } |
|
||||
* ... |
|
||||
* todo_start("dwim() not returning true yet"); |
|
||||
* ok(dwim(), "Did what the user wanted"); |
|
||||
* todo_end(); |
|
||||
*/ |
|
||||
void todo_start(const char *fmt, ...) PRINTF_FMT(1, 2); |
|
||||
|
|
||||
/**
|
|
||||
* todo_end - end of tests you expect to fail. |
|
||||
* |
|
||||
* See todo_start(). |
|
||||
*/ |
|
||||
void todo_end(void); |
|
||||
|
|
||||
/**
|
|
||||
* exit_status - the value that main should return. |
|
||||
* |
|
||||
* For maximum compatibility your test program should return a particular exit |
|
||||
* code (ie. 0 if all tests were run, and every test which was expected to |
|
||||
* succeed succeeded). |
|
||||
* |
|
||||
* Example: |
|
||||
* exit(exit_status()); |
|
||||
*/ |
|
||||
int exit_status(void); |
|
||||
|
|
||||
/**
|
|
||||
* plan_no_plan - I have no idea how many tests I'm going to run. |
|
||||
* |
|
||||
* In some situations you may not know how many tests you will be running, or |
|
||||
* you are developing your test program, and do not want to update the |
|
||||
* plan_tests() call every time you make a change. For those situations use |
|
||||
* plan_no_plan() instead of plan_tests(). It indicates to the test harness |
|
||||
* that an indeterminate number of tests will be run. |
|
||||
* |
|
||||
* Remember, if you fail to plan, you plan to fail. |
|
||||
* |
|
||||
* Example: |
|
||||
* plan_no_plan(); |
|
||||
* while (random() % 2) |
|
||||
* ok1(somefunc()); |
|
||||
* exit(exit_status()); |
|
||||
*/ |
|
||||
void plan_no_plan(void); |
|
||||
|
|
||||
/**
|
|
||||
* plan_skip_all - Indicate that you will skip all tests. |
|
||||
* @reason: the string indicating why you can't run any tests. |
|
||||
* |
|
||||
* If your test program detects at run time that some required functionality |
|
||||
* is missing (for example, it relies on a database connection which is not |
|
||||
* present, or a particular configuration option that has not been included |
|
||||
* in the running kernel) use plan_skip_all() instead of plan_tests(). |
|
||||
* |
|
||||
* Example: |
|
||||
* #ifndef HAVE_SOME_FEATURE |
|
||||
* plan_skip_all("Need SOME_FEATURE support"); |
|
||||
* exit(exit_status()); |
|
||||
* #else |
|
||||
* plan_tests(13); |
|
||||
* ... |
|
||||
* #endif |
|
||||
*/ |
|
||||
void plan_skip_all(const char *reason); |
|
||||
|
|
||||
/**
|
|
||||
* tap_fail_callback - function to call when we fail |
|
||||
* |
|
||||
* This can be used to ease debugging, or exit on the first failure. |
|
||||
*/ |
|
||||
void (*tap_fail_callback)(void); |
|
||||
|
|
||||
#endif /* CCAN_TAP_H */ |
|
@ -1,133 +0,0 @@ |
|||||
/* We use the fact that pipes have a buffer greater than the size of
|
|
||||
* any output, and change stdout and stderr to use that. |
|
||||
* |
|
||||
* Since we don't use libtap for output, this looks like one big test. */ |
|
||||
#include <ccan/tap/tap.h> |
|
||||
#include <ccan/tap/tap.c> |
|
||||
#include <stdio.h> |
|
||||
#include <limits.h> |
|
||||
#include <err.h> |
|
||||
#include <string.h> |
|
||||
#include <stdbool.h> |
|
||||
#include <fnmatch.h> |
|
||||
|
|
||||
|
|
||||
|
|
||||
/* We dup stderr to here. */ |
|
||||
static int stderrfd; |
|
||||
|
|
||||
/* write_all inlined here to avoid circular dependency. */ |
|
||||
static void write_all(int fd, const void *data, size_t size) |
|
||||
{ |
|
||||
while (size) { |
|
||||
ssize_t done; |
|
||||
|
|
||||
done = write(fd, data, size); |
|
||||
if (done <= 0) |
|
||||
_exit(1); |
|
||||
data = (const char *)data + done; |
|
||||
size -= done; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
/* Simple replacement for err() */ |
|
||||
static void failmsg(const char *fmt, ...) |
|
||||
{ |
|
||||
char buf[1024]; |
|
||||
va_list ap; |
|
||||
|
|
||||
/* Write into buffer. */ |
|
||||
va_start(ap, fmt); |
|
||||
vsprintf(buf, fmt, ap); |
|
||||
va_end(ap); |
|
||||
|
|
||||
write_all(stderrfd, "# ", 2); |
|
||||
write_all(stderrfd, buf, strlen(buf)); |
|
||||
write_all(stderrfd, "\n", 1); |
|
||||
_exit(1); |
|
||||
} |
|
||||
|
|
||||
static void expect(int fd, const char *pattern) |
|
||||
{ |
|
||||
char buffer[PIPE_BUF+1]; |
|
||||
int r; |
|
||||
|
|
||||
r = read(fd, buffer, sizeof(buffer)-1); |
|
||||
if (r < 0) |
|
||||
failmsg("reading from pipe"); |
|
||||
buffer[r] = '\0'; |
|
||||
|
|
||||
if (fnmatch(pattern, buffer, 0) != 0) |
|
||||
failmsg("Expected '%s' got '%s'", pattern, buffer); |
|
||||
} |
|
||||
|
|
||||
int main(int argc, char *argv[]) |
|
||||
{ |
|
||||
int p[2]; |
|
||||
int stdoutfd; |
|
||||
|
|
||||
setbuf(stdout, 0); |
|
||||
printf("1..1\n"); |
|
||||
stderrfd = dup(STDERR_FILENO); |
|
||||
if (stderrfd < 0) |
|
||||
err(1, "dup of stderr failed"); |
|
||||
|
|
||||
stdoutfd = dup(STDOUT_FILENO); |
|
||||
if (stdoutfd < 0) |
|
||||
err(1, "dup of stdout failed"); |
|
||||
|
|
||||
if (pipe(p) != 0) |
|
||||
failmsg("pipe failed"); |
|
||||
|
|
||||
if (dup2(p[1], STDERR_FILENO) < 0 || dup2(p[1], STDOUT_FILENO) < 0) |
|
||||
failmsg("Duplicating file descriptor"); |
|
||||
|
|
||||
plan_tests(10); |
|
||||
expect(p[0], "1..10\n"); |
|
||||
|
|
||||
ok(1, "msg1"); |
|
||||
expect(p[0], "ok 1 - msg1\n"); |
|
||||
|
|
||||
ok(0, "msg2"); |
|
||||
expect(p[0], "not ok 2 - msg2\n" |
|
||||
"# Failed test (*test/run.c:main() at line 91)\n"); |
|
||||
|
|
||||
ok1(true); |
|
||||
expect(p[0], "ok 3 - true\n"); |
|
||||
|
|
||||
ok1(false); |
|
||||
expect(p[0], "not ok 4 - false\n" |
|
||||
"# Failed test (*test/run.c:main() at line 98)\n"); |
|
||||
|
|
||||
pass("passed"); |
|
||||
expect(p[0], "ok 5 - passed\n"); |
|
||||
|
|
||||
fail("failed"); |
|
||||
expect(p[0], "not ok 6 - failed\n" |
|
||||
"# Failed test (*test/run.c:main() at line 105)\n"); |
|
||||
|
|
||||
skip(2, "skipping %s", "test"); |
|
||||
expect(p[0], "ok 7 # skip skipping test\n" |
|
||||
"ok 8 # skip skipping test\n"); |
|
||||
|
|
||||
todo_start("todo"); |
|
||||
ok1(false); |
|
||||
expect(p[0], "not ok 9 - false # TODO todo\n" |
|
||||
"# Failed (TODO) test (*test/run.c:main() at line 114)\n"); |
|
||||
ok1(true); |
|
||||
expect(p[0], "ok 10 - true # TODO todo\n"); |
|
||||
todo_end(); |
|
||||
|
|
||||
if (exit_status() != 3) |
|
||||
failmsg("Expected exit status 3, not %i", exit_status()); |
|
||||
|
|
||||
#if 0 |
|
||||
/* Manually run the atexit command. */ |
|
||||
_cleanup(); |
|
||||
expect(p[0], "# Looks like you failed 2 tests of 9.\n"); |
|
||||
#endif |
|
||||
|
|
||||
write_all(stdoutfd, "ok 1 - All passed\n", |
|
||||
strlen("ok 1 - All passed\n")); |
|
||||
exit(0); |
|
||||
} |
|
@ -1,17 +0,0 @@ |
|||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
|
||||
of this software and associated documentation files (the "Software"), to deal |
|
||||
in the Software without restriction, including without limitation the rights |
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
||||
copies of the Software, and to permit persons to whom the Software is |
|
||||
furnished to do so, subject to the following conditions: |
|
||||
|
|
||||
The above copyright notice and this permission notice shall be included in |
|
||||
all copies or substantial portions of the Software. |
|
||||
|
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
||||
THE SOFTWARE. |
|
@ -1,28 +0,0 @@ |
|||||
Statement of Purpose |
|
||||
|
|
||||
The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work"). |
|
||||
|
|
||||
Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others. |
|
||||
|
|
||||
For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights. |
|
||||
|
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following: |
|
||||
|
|
||||
the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work; |
|
||||
moral rights retained by the original author(s) and/or performer(s); |
|
||||
publicity and privacy rights pertaining to a person's image or likeness depicted in a Work; |
|
||||
rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below; |
|
||||
rights protecting the extraction, dissemination, use and reuse of data in a Work; |
|
||||
database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and |
|
||||
other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof. |
|
||||
|
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose. |
|
||||
|
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose. |
|
||||
|
|
||||
4. Limitations and Disclaimers. |
|
||||
|
|
||||
No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document. |
|
||||
Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law. |
|
||||
Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work. |
|
||||
Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work. |
|
@ -1,34 +0,0 @@ |
|||||
/* Config directives for ccan */ |
|
||||
|
|
||||
#ifdef WORDS_BIGENDIAN |
|
||||
# define HAVE_BIG_ENDIAN 1 |
|
||||
#else |
|
||||
# define HAVE_LITTLE_ENDIAN 1 |
|
||||
#endif |
|
||||
|
|
||||
#ifdef __GNUC__ |
|
||||
# define HAVE_ATTRIBUTE_COLD 1 |
|
||||
# define HAVE_ATTRIBUTE_NORETURN 1 |
|
||||
# define HAVE_ATTRIBUTE_PRINTF 1 |
|
||||
# define HAVE_ATTRIBUTE_CONST 1 |
|
||||
# define HAVE_ATTRIBUTE_PURE 1 |
|
||||
# define HAVE_ATTRIBUTE_UNUSED 1 |
|
||||
# define HAVE_ATTRIBUTE_USED 1 |
|
||||
# define HAVE_BUILTIN_CONSTANT_P 1 |
|
||||
# define HAVE_WARN_UNUSED_RESULT 1 |
|
||||
#endif |
|
||||
|
|
||||
#ifdef HAVE_BYTESWAP_H |
|
||||
#define HAVE_BSWAP_64 1 |
|
||||
#endif |
|
||||
|
|
||||
#if HAVE_UNALIGNED_ACCESS |
|
||||
#define alignment_ok(p, n) true |
|
||||
#else |
|
||||
#define alignment_ok(p, n) ((size_t)(p) % (n) == 0) |
|
||||
#endif |
|
||||
|
|
||||
/* Clear a set of memory areas passed as ptr1, len1, ptr2, len2 etc */ |
|
||||
void clear_n(unsigned int count, ...); |
|
||||
|
|
||||
#define CCAN_CLEAR_MEMORY(p, len) clear_n(1, p, len) |
|
@ -1,13 +0,0 @@ |
|||||
Copyright (C) 2016 The Android Open Source Project |
|
||||
|
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
|
||||
you may not use this file except in compliance with the License. |
|
||||
You may obtain a copy of the License at |
|
||||
|
|
||||
http://www.apache.org/licenses/LICENSE-2.0 |
|
||||
|
|
||||
Unless required by applicable law or agreed to in writing, software |
|
||||
distributed under the License is distributed on an "AS IS" BASIS, |
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
||||
See the License for the specific language governing permissions and |
|
||||
limitations under the License. |
|
File diff suppressed because it is too large
@ -1,318 +0,0 @@ |
|||||
/*
|
|
||||
* Copyright (C) 2010 The Android Open Source Project |
|
||||
* All rights reserved. |
|
||||
* |
|
||||
* Redistribution and use in source and binary forms, with or without |
|
||||
* modification, are permitted provided that the following conditions |
|
||||
* are met: |
|
||||
* * Redistributions of source code must retain the above copyright |
|
||||
* notice, this list of conditions and the following disclaimer. |
|
||||
* * Redistributions in binary form must reproduce the above copyright |
|
||||
* notice, this list of conditions and the following disclaimer in |
|
||||
* the documentation and/or other materials provided with the |
|
||||
* distribution. |
|
||||
* |
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS |
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
||||
* SUCH DAMAGE. |
|
||||
*/ |
|
||||
#ifndef CPU_FEATURES_H |
|
||||
#define CPU_FEATURES_H |
|
||||
|
|
||||
#include <sys/cdefs.h> |
|
||||
#include <stdint.h> |
|
||||
|
|
||||
__BEGIN_DECLS |
|
||||
|
|
||||
/* A list of valid values returned by android_getCpuFamily().
|
|
||||
* They describe the CPU Architecture of the current process. |
|
||||
*/ |
|
||||
typedef enum { |
|
||||
ANDROID_CPU_FAMILY_UNKNOWN = 0, |
|
||||
ANDROID_CPU_FAMILY_ARM, |
|
||||
ANDROID_CPU_FAMILY_X86, |
|
||||
ANDROID_CPU_FAMILY_MIPS, |
|
||||
ANDROID_CPU_FAMILY_ARM64, |
|
||||
ANDROID_CPU_FAMILY_X86_64, |
|
||||
ANDROID_CPU_FAMILY_MIPS64, |
|
||||
|
|
||||
ANDROID_CPU_FAMILY_MAX /* do not remove */ |
|
||||
|
|
||||
} AndroidCpuFamily; |
|
||||
|
|
||||
/* Return the CPU family of the current process.
|
|
||||
* |
|
||||
* Note that this matches the bitness of the current process. I.e. when |
|
||||
* running a 32-bit binary on a 64-bit capable CPU, this will return the |
|
||||
* 32-bit CPU family value. |
|
||||
*/ |
|
||||
extern AndroidCpuFamily android_getCpuFamily(void); |
|
||||
|
|
||||
/* Return a bitmap describing a set of optional CPU features that are
|
|
||||
* supported by the current device's CPU. The exact bit-flags returned |
|
||||
* depend on the value returned by android_getCpuFamily(). See the |
|
||||
* documentation for the ANDROID_CPU_*_FEATURE_* flags below for details. |
|
||||
*/ |
|
||||
extern uint64_t android_getCpuFeatures(void); |
|
||||
|
|
||||
/* The list of feature flags for ANDROID_CPU_FAMILY_ARM that can be
|
|
||||
* recognized by the library (see note below for 64-bit ARM). Value details |
|
||||
* are: |
|
||||
* |
|
||||
* VFPv2: |
|
||||
* CPU supports the VFPv2 instruction set. Many, but not all, ARMv6 CPUs |
|
||||
* support these instructions. VFPv2 is a subset of VFPv3 so this will |
|
||||
* be set whenever VFPv3 is set too. |
|
||||
* |
|
||||
* ARMv7: |
|
||||
* CPU supports the ARMv7-A basic instruction set. |
|
||||
* This feature is mandated by the 'armeabi-v7a' ABI. |
|
||||
* |
|
||||
* VFPv3: |
|
||||
* CPU supports the VFPv3-D16 instruction set, providing hardware FPU |
|
||||
* support for single and double precision floating point registers. |
|
||||
* Note that only 16 FPU registers are available by default, unless |
|
||||
* the D32 bit is set too. This feature is also mandated by the |
|
||||
* 'armeabi-v7a' ABI. |
|
||||
* |
|
||||
* VFP_D32: |
|
||||
* CPU VFP optional extension that provides 32 FPU registers, |
|
||||
* instead of 16. Note that ARM mandates this feature is the 'NEON' |
|
||||
* feature is implemented by the CPU. |
|
||||
* |
|
||||
* NEON: |
|
||||
* CPU FPU supports "ARM Advanced SIMD" instructions, also known as |
|
||||
* NEON. Note that this mandates the VFP_D32 feature as well, per the |
|
||||
* ARM Architecture specification. |
|
||||
* |
|
||||
* VFP_FP16: |
|
||||
* Half-width floating precision VFP extension. If set, the CPU |
|
||||
* supports instructions to perform floating-point operations on |
|
||||
* 16-bit registers. This is part of the VFPv4 specification, but |
|
||||
* not mandated by any Android ABI. |
|
||||
* |
|
||||
* VFP_FMA: |
|
||||
* Fused multiply-accumulate VFP instructions extension. Also part of |
|
||||
* the VFPv4 specification, but not mandated by any Android ABI. |
|
||||
* |
|
||||
* NEON_FMA: |
|
||||
* Fused multiply-accumulate NEON instructions extension. Optional |
|
||||
* extension from the VFPv4 specification, but not mandated by any |
|
||||
* Android ABI. |
|
||||
* |
|
||||
* IDIV_ARM: |
|
||||
* Integer division available in ARM mode. Only available |
|
||||
* on recent CPUs (e.g. Cortex-A15). |
|
||||
* |
|
||||
* IDIV_THUMB2: |
|
||||
* Integer division available in Thumb-2 mode. Only available |
|
||||
* on recent CPUs (e.g. Cortex-A15). |
|
||||
* |
|
||||
* iWMMXt: |
|
||||
* Optional extension that adds MMX registers and operations to an |
|
||||
* ARM CPU. This is only available on a few XScale-based CPU designs |
|
||||
* sold by Marvell. Pretty rare in practice. |
|
||||
* |
|
||||
* AES: |
|
||||
* CPU supports AES instructions. These instructions are only |
|
||||
* available for 32-bit applications running on ARMv8 CPU. |
|
||||
* |
|
||||
* CRC32: |
|
||||
* CPU supports CRC32 instructions. These instructions are only |
|
||||
* available for 32-bit applications running on ARMv8 CPU. |
|
||||
* |
|
||||
* SHA2: |
|
||||
* CPU supports SHA2 instructions. These instructions are only |
|
||||
* available for 32-bit applications running on ARMv8 CPU. |
|
||||
* |
|
||||
* SHA1: |
|
||||
* CPU supports SHA1 instructions. These instructions are only |
|
||||
* available for 32-bit applications running on ARMv8 CPU. |
|
||||
* |
|
||||
* PMULL: |
|
||||
* CPU supports 64-bit PMULL and PMULL2 instructions. These |
|
||||
* instructions are only available for 32-bit applications |
|
||||
* running on ARMv8 CPU. |
|
||||
* |
|
||||
* If you want to tell the compiler to generate code that targets one of |
|
||||
* the feature set above, you should probably use one of the following |
|
||||
* flags (for more details, see technical note at the end of this file): |
|
||||
* |
|
||||
* -mfpu=vfp |
|
||||
* -mfpu=vfpv2 |
|
||||
* These are equivalent and tell GCC to use VFPv2 instructions for |
|
||||
* floating-point operations. Use this if you want your code to |
|
||||
* run on *some* ARMv6 devices, and any ARMv7-A device supported |
|
||||
* by Android. |
|
||||
* |
|
||||
* Generated code requires VFPv2 feature. |
|
||||
* |
|
||||
* -mfpu=vfpv3-d16 |
|
||||
* Tell GCC to use VFPv3 instructions (using only 16 FPU registers). |
|
||||
* This should be generic code that runs on any CPU that supports the |
|
||||
* 'armeabi-v7a' Android ABI. Note that no ARMv6 CPU supports this. |
|
||||
* |
|
||||
* Generated code requires VFPv3 feature. |
|
||||
* |
|
||||
* -mfpu=vfpv3 |
|
||||
* Tell GCC to use VFPv3 instructions with 32 FPU registers. |
|
||||
* Generated code requires VFPv3|VFP_D32 features. |
|
||||
* |
|
||||
* -mfpu=neon |
|
||||
* Tell GCC to use VFPv3 instructions with 32 FPU registers, and |
|
||||
* also support NEON intrinsics (see <arm_neon.h>). |
|
||||
* Generated code requires VFPv3|VFP_D32|NEON features. |
|
||||
* |
|
||||
* -mfpu=vfpv4-d16 |
|
||||
* Generated code requires VFPv3|VFP_FP16|VFP_FMA features. |
|
||||
* |
|
||||
* -mfpu=vfpv4 |
|
||||
* Generated code requires VFPv3|VFP_FP16|VFP_FMA|VFP_D32 features. |
|
||||
* |
|
||||
* -mfpu=neon-vfpv4 |
|
||||
* Generated code requires VFPv3|VFP_FP16|VFP_FMA|VFP_D32|NEON|NEON_FMA |
|
||||
* features. |
|
||||
* |
|
||||
* -mcpu=cortex-a7 |
|
||||
* -mcpu=cortex-a15 |
|
||||
* Generated code requires VFPv3|VFP_FP16|VFP_FMA|VFP_D32| |
|
||||
* NEON|NEON_FMA|IDIV_ARM|IDIV_THUMB2 |
|
||||
* This flag implies -mfpu=neon-vfpv4. |
|
||||
* |
|
||||
* -mcpu=iwmmxt |
|
||||
* Allows the use of iWMMXt instrinsics with GCC. |
|
||||
* |
|
||||
* IMPORTANT NOTE: These flags should only be tested when |
|
||||
* android_getCpuFamily() returns ANDROID_CPU_FAMILY_ARM, i.e. this is a |
|
||||
* 32-bit process. |
|
||||
* |
|
||||
* When running a 64-bit ARM process on an ARMv8 CPU, |
|
||||
* android_getCpuFeatures() will return a different set of bitflags |
|
||||
*/ |
|
||||
enum { |
|
||||
ANDROID_CPU_ARM_FEATURE_ARMv7 = (1 << 0), |
|
||||
ANDROID_CPU_ARM_FEATURE_VFPv3 = (1 << 1), |
|
||||
ANDROID_CPU_ARM_FEATURE_NEON = (1 << 2), |
|
||||
ANDROID_CPU_ARM_FEATURE_LDREX_STREX = (1 << 3), |
|
||||
ANDROID_CPU_ARM_FEATURE_VFPv2 = (1 << 4), |
|
||||
ANDROID_CPU_ARM_FEATURE_VFP_D32 = (1 << 5), |
|
||||
ANDROID_CPU_ARM_FEATURE_VFP_FP16 = (1 << 6), |
|
||||
ANDROID_CPU_ARM_FEATURE_VFP_FMA = (1 << 7), |
|
||||
ANDROID_CPU_ARM_FEATURE_NEON_FMA = (1 << 8), |
|
||||
ANDROID_CPU_ARM_FEATURE_IDIV_ARM = (1 << 9), |
|
||||
ANDROID_CPU_ARM_FEATURE_IDIV_THUMB2 = (1 << 10), |
|
||||
ANDROID_CPU_ARM_FEATURE_iWMMXt = (1 << 11), |
|
||||
ANDROID_CPU_ARM_FEATURE_AES = (1 << 12), |
|
||||
ANDROID_CPU_ARM_FEATURE_PMULL = (1 << 13), |
|
||||
ANDROID_CPU_ARM_FEATURE_SHA1 = (1 << 14), |
|
||||
ANDROID_CPU_ARM_FEATURE_SHA2 = (1 << 15), |
|
||||
ANDROID_CPU_ARM_FEATURE_CRC32 = (1 << 16) |
|
||||
}; |
|
||||
|
|
||||
/* The bit flags corresponding to the output of android_getCpuFeatures()
|
|
||||
* when android_getCpuFamily() returns ANDROID_CPU_FAMILY_ARM64. Value details |
|
||||
* are: |
|
||||
* |
|
||||
* FP: |
|
||||
* CPU has Floating-point unit. |
|
||||
* |
|
||||
* ASIMD: |
|
||||
* CPU has Advanced SIMD unit. |
|
||||
* |
|
||||
* AES: |
|
||||
* CPU supports AES instructions. |
|
||||
* |
|
||||
* CRC32: |
|
||||
* CPU supports CRC32 instructions. |
|
||||
* |
|
||||
* SHA2: |
|
||||
* CPU supports SHA2 instructions. |
|
||||
* |
|
||||
* SHA1: |
|
||||
* CPU supports SHA1 instructions. |
|
||||
* |
|
||||
* PMULL: |
|
||||
* CPU supports 64-bit PMULL and PMULL2 instructions. |
|
||||
*/ |
|
||||
enum { |
|
||||
ANDROID_CPU_ARM64_FEATURE_FP = (1 << 0), |
|
||||
ANDROID_CPU_ARM64_FEATURE_ASIMD = (1 << 1), |
|
||||
ANDROID_CPU_ARM64_FEATURE_AES = (1 << 2), |
|
||||
ANDROID_CPU_ARM64_FEATURE_PMULL = (1 << 3), |
|
||||
ANDROID_CPU_ARM64_FEATURE_SHA1 = (1 << 4), |
|
||||
ANDROID_CPU_ARM64_FEATURE_SHA2 = (1 << 5), |
|
||||
ANDROID_CPU_ARM64_FEATURE_CRC32 = (1 << 6) |
|
||||
}; |
|
||||
|
|
||||
/* The bit flags corresponding to the output of android_getCpuFeatures()
|
|
||||
* when android_getCpuFamily() returns ANDROID_CPU_FAMILY_X86 or |
|
||||
* ANDROID_CPU_FAMILY_X86_64. |
|
||||
*/ |
|
||||
enum { |
|
||||
ANDROID_CPU_X86_FEATURE_SSSE3 = (1 << 0), |
|
||||
ANDROID_CPU_X86_FEATURE_POPCNT = (1 << 1), |
|
||||
ANDROID_CPU_X86_FEATURE_MOVBE = (1 << 2), |
|
||||
ANDROID_CPU_X86_FEATURE_SSE4_1 = (1 << 3), |
|
||||
ANDROID_CPU_X86_FEATURE_SSE4_2 = (1 << 4) |
|
||||
}; |
|
||||
|
|
||||
/* The bit flags corresponding to the output of android_getCpuFeatures()
|
|
||||
* when android_getCpuFamily() returns ANDROID_CPU_FAMILY_MIPS |
|
||||
* or ANDROID_CPU_FAMILY_MIPS64. Values are: |
|
||||
* |
|
||||
* R6: |
|
||||
* CPU executes MIPS Release 6 instructions natively, and |
|
||||
* supports obsoleted R1..R5 instructions only via kernel traps. |
|
||||
* |
|
||||
* MSA: |
|
||||
* CPU supports Mips SIMD Architecture instructions. |
|
||||
*/ |
|
||||
enum { |
|
||||
ANDROID_CPU_MIPS_FEATURE_R6 = (1 << 0), |
|
||||
ANDROID_CPU_MIPS_FEATURE_MSA = (1 << 1) |
|
||||
}; |
|
||||
|
|
||||
|
|
||||
/* Return the number of CPU cores detected on this device. */ |
|
||||
extern int android_getCpuCount(void); |
|
||||
|
|
||||
/* The following is used to force the CPU count and features
|
|
||||
* mask in sandboxed processes. Under 4.1 and higher, these processes |
|
||||
* cannot access /proc, which is the only way to get information from |
|
||||
* the kernel about the current hardware (at least on ARM). |
|
||||
* |
|
||||
* It _must_ be called only once, and before any android_getCpuXXX |
|
||||
* function, any other case will fail. |
|
||||
* |
|
||||
* This function return 1 on success, and 0 on failure. |
|
||||
*/ |
|
||||
extern int android_setCpu(int cpu_count, |
|
||||
uint64_t cpu_features); |
|
||||
|
|
||||
#ifdef __arm__ |
|
||||
/* Retrieve the ARM 32-bit CPUID value from the kernel.
|
|
||||
* Note that this cannot work on sandboxed processes under 4.1 and |
|
||||
* higher, unless you called android_setCpuArm() before. |
|
||||
*/ |
|
||||
extern uint32_t android_getCpuIdArm(void); |
|
||||
|
|
||||
/* An ARM-specific variant of android_setCpu() that also allows you
|
|
||||
* to set the ARM CPUID field. |
|
||||
*/ |
|
||||
extern int android_setCpuArm(int cpu_count, |
|
||||
uint64_t cpu_features, |
|
||||
uint32_t cpu_id); |
|
||||
#endif |
|
||||
|
|
||||
__END_DECLS |
|
||||
|
|
||||
#endif /* CPU_FEATURES_H */ |
|
@ -1,21 +0,0 @@ |
|||||
The MIT License (MIT) |
|
||||
|
|
||||
Copyright (c) 2016 Pieter Wuille |
|
||||
|
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
|
||||
of this software and associated documentation files (the "Software"), to deal |
|
||||
in the Software without restriction, including without limitation the rights |
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
||||
copies of the Software, and to permit persons to whom the Software is |
|
||||
furnished to do so, subject to the following conditions: |
|
||||
|
|
||||
The above copyright notice and this permission notice shall be included in |
|
||||
all copies or substantial portions of the Software. |
|
||||
|
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
||||
THE SOFTWARE. |
|
@ -1,41 +0,0 @@ |
|||||
ctaes |
|
||||
===== |
|
||||
|
|
||||
Simple C module for constant-time AES encryption and decryption. |
|
||||
|
|
||||
Features: |
|
||||
* Simple, pure C code without any dependencies. |
|
||||
* No tables or data-dependent branches whatsoever, but using bit sliced approach from https://eprint.iacr.org/2009/129.pdf. |
|
||||
* Very small object code: slightly over 4k of executable code when compiled with -Os. |
|
||||
* Slower than implementations based on precomputed tables or specialized instructions, but can do ~15 MB/s on modern CPUs. |
|
||||
|
|
||||
Performance |
|
||||
----------- |
|
||||
|
|
||||
Compiled with GCC 5.3.1 with -O3, on an Intel(R) Core(TM) i7-4800MQ CPU, numbers in CPU cycles: |
|
||||
|
|
||||
| Algorithm | Key schedule | Encryption per byte | Decryption per byte | |
|
||||
| --------- | ------------:| -------------------:| -------------------:| |
|
||||
| AES-128 | 2.8k | 154 | 161 | |
|
||||
| AES-192 | 3.1k | 169 | 181 | |
|
||||
| AES-256 | 4.0k | 191 | 203 | |
|
||||
|
|
||||
Build steps |
|
||||
----------- |
|
||||
|
|
||||
Object code: |
|
||||
|
|
||||
$ gcc -O3 ctaes.c -c -o ctaes.o |
|
||||
|
|
||||
Tests: |
|
||||
|
|
||||
$ gcc -O3 ctaes.c test.c -o test |
|
||||
|
|
||||
Benchmark: |
|
||||
|
|
||||
$ gcc -O3 ctaes.c bench.c -o bench |
|
||||
|
|
||||
Review |
|
||||
------ |
|
||||
|
|
||||
Results of a formal review of the code can be found in http://bitcoin.sipa.be/ctaes/review.zip |
|
@ -1,170 +0,0 @@ |
|||||
#include <stdio.h> |
|
||||
#include <math.h> |
|
||||
#include "sys/time.h" |
|
||||
|
|
||||
#include "ctaes.h" |
|
||||
|
|
||||
static double gettimedouble(void) { |
|
||||
struct timeval tv; |
|
||||
gettimeofday(&tv, NULL); |
|
||||
return tv.tv_usec * 0.000001 + tv.tv_sec; |
|
||||
} |
|
||||
|
|
||||
static void print_number(double x) { |
|
||||
double y = x; |
|
||||
int c = 0; |
|
||||
if (y < 0.0) { |
|
||||
y = -y; |
|
||||
} |
|
||||
while (y < 100.0) { |
|
||||
y *= 10.0; |
|
||||
c++; |
|
||||
} |
|
||||
printf("%.*f", c, x); |
|
||||
} |
|
||||
|
|
||||
static void run_benchmark(char *name, void (*benchmark)(void*), void (*setup)(void*), void (*teardown)(void*), void* data, int count, int iter) { |
|
||||
int i; |
|
||||
double min = HUGE_VAL; |
|
||||
double sum = 0.0; |
|
||||
double max = 0.0; |
|
||||
for (i = 0; i < count; i++) { |
|
||||
double begin, total; |
|
||||
if (setup != NULL) { |
|
||||
setup(data); |
|
||||
} |
|
||||
begin = gettimedouble(); |
|
||||
benchmark(data); |
|
||||
total = gettimedouble() - begin; |
|
||||
if (teardown != NULL) { |
|
||||
teardown(data); |
|
||||
} |
|
||||
if (total < min) { |
|
||||
min = total; |
|
||||
} |
|
||||
if (total > max) { |
|
||||
max = total; |
|
||||
} |
|
||||
sum += total; |
|
||||
} |
|
||||
printf("%s: min ", name); |
|
||||
print_number(min * 1000000000.0 / iter); |
|
||||
printf("ns / avg "); |
|
||||
print_number((sum / count) * 1000000000.0 / iter); |
|
||||
printf("ns / max "); |
|
||||
print_number(max * 1000000000.0 / iter); |
|
||||
printf("ns\n"); |
|
||||
} |
|
||||
|
|
||||
static void bench_AES128_init(void* data) { |
|
||||
AES128_ctx* ctx = (AES128_ctx*)data; |
|
||||
int i; |
|
||||
for (i = 0; i < 50000; i++) { |
|
||||
AES128_init(ctx, (unsigned char*)ctx); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
static void bench_AES128_encrypt_setup(void* data) { |
|
||||
AES128_ctx* ctx = (AES128_ctx*)data; |
|
||||
static const unsigned char key[16] = {0}; |
|
||||
AES128_init(ctx, key); |
|
||||
} |
|
||||
|
|
||||
static void bench_AES128_encrypt(void* data) { |
|
||||
const AES128_ctx* ctx = (const AES128_ctx*)data; |
|
||||
unsigned char scratch[16] = {0}; |
|
||||
int i; |
|
||||
for (i = 0; i < 4000000 / 16; i++) { |
|
||||
AES128_encrypt(ctx, 1, scratch, scratch); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
static void bench_AES128_decrypt(void* data) { |
|
||||
const AES128_ctx* ctx = (const AES128_ctx*)data; |
|
||||
unsigned char scratch[16] = {0}; |
|
||||
int i; |
|
||||
for (i = 0; i < 4000000 / 16; i++) { |
|
||||
AES128_decrypt(ctx, 1, scratch, scratch); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
static void bench_AES192_init(void* data) { |
|
||||
AES192_ctx* ctx = (AES192_ctx*)data; |
|
||||
int i; |
|
||||
for (i = 0; i < 50000; i++) { |
|
||||
AES192_init(ctx, (unsigned char*)ctx); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
static void bench_AES192_encrypt_setup(void* data) { |
|
||||
AES192_ctx* ctx = (AES192_ctx*)data; |
|
||||
static const unsigned char key[16] = {0}; |
|
||||
AES192_init(ctx, key); |
|
||||
} |
|
||||
|
|
||||
static void bench_AES192_encrypt(void* data) { |
|
||||
const AES192_ctx* ctx = (const AES192_ctx*)data; |
|
||||
unsigned char scratch[16] = {0}; |
|
||||
int i; |
|
||||
for (i = 0; i < 4000000 / 16; i++) { |
|
||||
AES192_encrypt(ctx, 1, scratch, scratch); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
static void bench_AES192_decrypt(void* data) { |
|
||||
const AES192_ctx* ctx = (const AES192_ctx*)data; |
|
||||
unsigned char scratch[16] = {0}; |
|
||||
int i; |
|
||||
for (i = 0; i < 4000000 / 16; i++) { |
|
||||
AES192_decrypt(ctx, 1, scratch, scratch); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
static void bench_AES256_init(void* data) { |
|
||||
AES256_ctx* ctx = (AES256_ctx*)data; |
|
||||
int i; |
|
||||
for (i = 0; i < 50000; i++) { |
|
||||
AES256_init(ctx, (unsigned char*)ctx); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
|
|
||||
static void bench_AES256_encrypt_setup(void* data) { |
|
||||
AES256_ctx* ctx = (AES256_ctx*)data; |
|
||||
static const unsigned char key[16] = {0}; |
|
||||
AES256_init(ctx, key); |
|
||||
} |
|
||||
|
|
||||
static void bench_AES256_encrypt(void* data) { |
|
||||
const AES256_ctx* ctx = (const AES256_ctx*)data; |
|
||||
unsigned char scratch[16] = {0}; |
|
||||
int i; |
|
||||
for (i = 0; i < 4000000 / 16; i++) { |
|
||||
AES256_encrypt(ctx, 1, scratch, scratch); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
static void bench_AES256_decrypt(void* data) { |
|
||||
const AES256_ctx* ctx = (const AES256_ctx*)data; |
|
||||
unsigned char scratch[16] = {0}; |
|
||||
int i; |
|
||||
for (i = 0; i < 4000000 / 16; i++) { |
|
||||
AES256_decrypt(ctx, 1, scratch, scratch); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
int main(void) { |
|
||||
AES128_ctx ctx128; |
|
||||
AES192_ctx ctx192; |
|
||||
AES256_ctx ctx256; |
|
||||
run_benchmark("aes128_init", bench_AES128_init, NULL, NULL, &ctx128, 20, 50000); |
|
||||
run_benchmark("aes128_encrypt_byte", bench_AES128_encrypt, bench_AES128_encrypt_setup, NULL, &ctx128, 20, 4000000); |
|
||||
run_benchmark("aes128_decrypt_byte", bench_AES128_decrypt, bench_AES128_encrypt_setup, NULL, &ctx128, 20, 4000000); |
|
||||
run_benchmark("aes192_init", bench_AES192_init, NULL, NULL, &ctx192, 20, 50000); |
|
||||
run_benchmark("aes192_encrypt_byte", bench_AES192_encrypt, bench_AES192_encrypt_setup, NULL, &ctx192, 20, 4000000); |
|
||||
run_benchmark("aes192_decrypt_byte", bench_AES192_decrypt, bench_AES192_encrypt_setup, NULL, &ctx192, 20, 4000000); |
|
||||
run_benchmark("aes256_init", bench_AES256_init, NULL, NULL, &ctx256, 20, 50000); |
|
||||
run_benchmark("aes256_encrypt_byte", bench_AES256_encrypt, bench_AES256_encrypt_setup, NULL, &ctx256, 20, 4000000); |
|
||||
run_benchmark("aes256_decrypt_byte", bench_AES256_decrypt, bench_AES256_encrypt_setup, NULL, &ctx256, 20, 4000000); |
|
||||
return 0; |
|
||||
} |
|
@ -1,556 +0,0 @@ |
|||||
/*********************************************************************
|
|
||||
* Copyright (c) 2016 Pieter Wuille * |
|
||||
* Distributed under the MIT software license, see the accompanying * |
|
||||
* file COPYING or http://www.opensource.org/licenses/mit-license.php.*
|
|
||||
**********************************************************************/ |
|
||||
|
|
||||
/* Constant time, unoptimized, concise, plain C, AES implementation
|
|
||||
* Based On: |
|
||||
* Emilia Kasper and Peter Schwabe, Faster and Timing-Attack Resistant AES-GCM |
|
||||
* http://www.iacr.org/archive/ches2009/57470001/57470001.pdf
|
|
||||
* But using 8 16-bit integers representing a single AES state rather than 8 128-bit |
|
||||
* integers representing 8 AES states. |
|
||||
*/ |
|
||||
|
|
||||
#include "ctaes.h" |
|
||||
|
|
||||
/* Slice variable slice_i contains the i'th bit of the 16 state variables in this order:
|
|
||||
* 0 1 2 3 |
|
||||
* 4 5 6 7 |
|
||||
* 8 9 10 11 |
|
||||
* 12 13 14 15 |
|
||||
*/ |
|
||||
|
|
||||
/** Convert a byte to sliced form, storing it corresponding to given row and column in s */ |
|
||||
static void LoadByte(AES_state* s, unsigned char byte, int r, int c) { |
|
||||
int i; |
|
||||
for (i = 0; i < 8; i++) { |
|
||||
s->slice[i] |= (byte & 1) << (r * 4 + c); |
|
||||
byte >>= 1; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
/** Load 16 bytes of data into 8 sliced integers */ |
|
||||
static void LoadBytes(AES_state *s, const unsigned char* data16) { |
|
||||
int c; |
|
||||
for (c = 0; c < 4; c++) { |
|
||||
int r; |
|
||||
for (r = 0; r < 4; r++) { |
|
||||
LoadByte(s, *(data16++), r, c); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
/** Convert 8 sliced integers into 16 bytes of data */ |
|
||||
static void SaveBytes(unsigned char* data16, const AES_state *s) { |
|
||||
int c; |
|
||||
for (c = 0; c < 4; c++) { |
|
||||
int r; |
|
||||
for (r = 0; r < 4; r++) { |
|
||||
int b; |
|
||||
uint8_t v = 0; |
|
||||
for (b = 0; b < 8; b++) { |
|
||||
v |= ((s->slice[b] >> (r * 4 + c)) & 1) << b; |
|
||||
} |
|
||||
*(data16++) = v; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
/* S-box implementation based on the gate logic from:
|
|
||||
* Joan Boyar and Rene Peralta, A depth-16 circuit for the AES S-box. |
|
||||
* https://eprint.iacr.org/2011/332.pdf
|
|
||||
*/ |
|
||||
static void SubBytes(AES_state *s, int inv) { |
|
||||
/* Load the bit slices */ |
|
||||
uint16_t U0 = s->slice[7], U1 = s->slice[6], U2 = s->slice[5], U3 = s->slice[4]; |
|
||||
uint16_t U4 = s->slice[3], U5 = s->slice[2], U6 = s->slice[1], U7 = s->slice[0]; |
|
||||
|
|
||||
uint16_t T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16; |
|
||||
uint16_t T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, D; |
|
||||
uint16_t M1, M6, M11, M13, M15, M20, M21, M22, M23, M25, M37, M38, M39, M40; |
|
||||
uint16_t M41, M42, M43, M44, M45, M46, M47, M48, M49, M50, M51, M52, M53, M54; |
|
||||
uint16_t M55, M56, M57, M58, M59, M60, M61, M62, M63; |
|
||||
|
|
||||
if (inv) { |
|
||||
uint16_t R5, R13, R17, R18, R19; |
|
||||
/* Undo linear postprocessing */ |
|
||||
T23 = U0 ^ U3; |
|
||||
T22 = ~(U1 ^ U3); |
|
||||
T2 = ~(U0 ^ U1); |
|
||||
T1 = U3 ^ U4; |
|
||||
T24 = ~(U4 ^ U7); |
|
||||
R5 = U6 ^ U7; |
|
||||
T8 = ~(U1 ^ T23); |
|
||||
T19 = T22 ^ R5; |
|
||||
T9 = ~(U7 ^ T1); |
|
||||
T10 = T2 ^ T24; |
|
||||
T13 = T2 ^ R5; |
|
||||
T3 = T1 ^ R5; |
|
||||
T25 = ~(U2 ^ T1); |
|
||||
R13 = U1 ^ U6; |
|
||||
T17 = ~(U2 ^ T19); |
|
||||
T20 = T24 ^ R13; |
|
||||
T4 = U4 ^ T8; |
|
||||
R17 = ~(U2 ^ U5); |
|
||||
R18 = ~(U5 ^ U6); |
|
||||
R19 = ~(U2 ^ U4); |
|
||||
D = U0 ^ R17; |
|
||||
T6 = T22 ^ R17; |
|
||||
T16 = R13 ^ R19; |
|
||||
T27 = T1 ^ R18; |
|
||||
T15 = T10 ^ T27; |
|
||||
T14 = T10 ^ R18; |
|
||||
T26 = T3 ^ T16; |
|
||||
} else { |
|
||||
/* Linear preprocessing. */ |
|
||||
T1 = U0 ^ U3; |
|
||||
T2 = U0 ^ U5; |
|
||||
T3 = U0 ^ U6; |
|
||||
T4 = U3 ^ U5; |
|
||||
T5 = U4 ^ U6; |
|
||||
T6 = T1 ^ T5; |
|
||||
T7 = U1 ^ U2; |
|
||||
T8 = U7 ^ T6; |
|
||||
T9 = U7 ^ T7; |
|
||||
T10 = T6 ^ T7; |
|
||||
T11 = U1 ^ U5; |
|
||||
T12 = U2 ^ U5; |
|
||||
T13 = T3 ^ T4; |
|
||||
T14 = T6 ^ T11; |
|
||||
T15 = T5 ^ T11; |
|
||||
T16 = T5 ^ T12; |
|
||||
T17 = T9 ^ T16; |
|
||||
T18 = U3 ^ U7; |
|
||||
T19 = T7 ^ T18; |
|
||||
T20 = T1 ^ T19; |
|
||||
T21 = U6 ^ U7; |
|
||||
T22 = T7 ^ T21; |
|
||||
T23 = T2 ^ T22; |
|
||||
T24 = T2 ^ T10; |
|
||||
T25 = T20 ^ T17; |
|
||||
T26 = T3 ^ T16; |
|
||||
T27 = T1 ^ T12; |
|
||||
D = U7; |
|
||||
} |
|
||||
|
|
||||
/* Non-linear transformation (shared between the forward and backward case) */ |
|
||||
M1 = T13 & T6; |
|
||||
M6 = T3 & T16; |
|
||||
M11 = T1 & T15; |
|
||||
M13 = (T4 & T27) ^ M11; |
|
||||
M15 = (T2 & T10) ^ M11; |
|
||||
M20 = T14 ^ M1 ^ (T23 & T8) ^ M13; |
|
||||
M21 = (T19 & D) ^ M1 ^ T24 ^ M15; |
|
||||
M22 = T26 ^ M6 ^ (T22 & T9) ^ M13; |
|
||||
M23 = (T20 & T17) ^ M6 ^ M15 ^ T25; |
|
||||
M25 = M22 & M20; |
|
||||
M37 = M21 ^ ((M20 ^ M21) & (M23 ^ M25)); |
|
||||
M38 = M20 ^ M25 ^ (M21 | (M20 & M23)); |
|
||||
M39 = M23 ^ ((M22 ^ M23) & (M21 ^ M25)); |
|
||||
M40 = M22 ^ M25 ^ (M23 | (M21 & M22)); |
|
||||
M41 = M38 ^ M40; |
|
||||
M42 = M37 ^ M39; |
|
||||
M43 = M37 ^ M38; |
|
||||
M44 = M39 ^ M40; |
|
||||
M45 = M42 ^ M41; |
|
||||
M46 = M44 & T6; |
|
||||
M47 = M40 & T8; |
|
||||
M48 = M39 & D; |
|
||||
M49 = M43 & T16; |
|
||||
M50 = M38 & T9; |
|
||||
M51 = M37 & T17; |
|
||||
M52 = M42 & T15; |
|
||||
M53 = M45 & T27; |
|
||||
M54 = M41 & T10; |
|
||||
M55 = M44 & T13; |
|
||||
M56 = M40 & T23; |
|
||||
M57 = M39 & T19; |
|
||||
M58 = M43 & T3; |
|
||||
M59 = M38 & T22; |
|
||||
M60 = M37 & T20; |
|
||||
M61 = M42 & T1; |
|
||||
M62 = M45 & T4; |
|
||||
M63 = M41 & T2; |
|
||||
|
|
||||
if (inv){ |
|
||||
/* Undo linear preprocessing */ |
|
||||
uint16_t P0 = M52 ^ M61; |
|
||||
uint16_t P1 = M58 ^ M59; |
|
||||
uint16_t P2 = M54 ^ M62; |
|
||||
uint16_t P3 = M47 ^ M50; |
|
||||
uint16_t P4 = M48 ^ M56; |
|
||||
uint16_t P5 = M46 ^ M51; |
|
||||
uint16_t P6 = M49 ^ M60; |
|
||||
uint16_t P7 = P0 ^ P1; |
|
||||
uint16_t P8 = M50 ^ M53; |
|
||||
uint16_t P9 = M55 ^ M63; |
|
||||
uint16_t P10 = M57 ^ P4; |
|
||||
uint16_t P11 = P0 ^ P3; |
|
||||
uint16_t P12 = M46 ^ M48; |
|
||||
uint16_t P13 = M49 ^ M51; |
|
||||
uint16_t P14 = M49 ^ M62; |
|
||||
uint16_t P15 = M54 ^ M59; |
|
||||
uint16_t P16 = M57 ^ M61; |
|
||||
uint16_t P17 = M58 ^ P2; |
|
||||
uint16_t P18 = M63 ^ P5; |
|
||||
uint16_t P19 = P2 ^ P3; |
|
||||
uint16_t P20 = P4 ^ P6; |
|
||||
uint16_t P22 = P2 ^ P7; |
|
||||
uint16_t P23 = P7 ^ P8; |
|
||||
uint16_t P24 = P5 ^ P7; |
|
||||
uint16_t P25 = P6 ^ P10; |
|
||||
uint16_t P26 = P9 ^ P11; |
|
||||
uint16_t P27 = P10 ^ P18; |
|
||||
uint16_t P28 = P11 ^ P25; |
|
||||
uint16_t P29 = P15 ^ P20; |
|
||||
s->slice[7] = P13 ^ P22; |
|
||||
s->slice[6] = P26 ^ P29; |
|
||||
s->slice[5] = P17 ^ P28; |
|
||||
s->slice[4] = P12 ^ P22; |
|
||||
s->slice[3] = P23 ^ P27; |
|
||||
s->slice[2] = P19 ^ P24; |
|
||||
s->slice[1] = P14 ^ P23; |
|
||||
s->slice[0] = P9 ^ P16; |
|
||||
} else { |
|
||||
/* Linear postprocessing */ |
|
||||
uint16_t L0 = M61 ^ M62; |
|
||||
uint16_t L1 = M50 ^ M56; |
|
||||
uint16_t L2 = M46 ^ M48; |
|
||||
uint16_t L3 = M47 ^ M55; |
|
||||
uint16_t L4 = M54 ^ M58; |
|
||||
uint16_t L5 = M49 ^ M61; |
|
||||
uint16_t L6 = M62 ^ L5; |
|
||||
uint16_t L7 = M46 ^ L3; |
|
||||
uint16_t L8 = M51 ^ M59; |
|
||||
uint16_t L9 = M52 ^ M53; |
|
||||
uint16_t L10 = M53 ^ L4; |
|
||||
uint16_t L11 = M60 ^ L2; |
|
||||
uint16_t L12 = M48 ^ M51; |
|
||||
uint16_t L13 = M50 ^ L0; |
|
||||
uint16_t L14 = M52 ^ M61; |
|
||||
uint16_t L15 = M55 ^ L1; |
|
||||
uint16_t L16 = M56 ^ L0; |
|
||||
uint16_t L17 = M57 ^ L1; |
|
||||
uint16_t L18 = M58 ^ L8; |
|
||||
uint16_t L19 = M63 ^ L4; |
|
||||
uint16_t L20 = L0 ^ L1; |
|
||||
uint16_t L21 = L1 ^ L7; |
|
||||
uint16_t L22 = L3 ^ L12; |
|
||||
uint16_t L23 = L18 ^ L2; |
|
||||
uint16_t L24 = L15 ^ L9; |
|
||||
uint16_t L25 = L6 ^ L10; |
|
||||
uint16_t L26 = L7 ^ L9; |
|
||||
uint16_t L27 = L8 ^ L10; |
|
||||
uint16_t L28 = L11 ^ L14; |
|
||||
uint16_t L29 = L11 ^ L17; |
|
||||
s->slice[7] = L6 ^ L24; |
|
||||
s->slice[6] = ~(L16 ^ L26); |
|
||||
s->slice[5] = ~(L19 ^ L28); |
|
||||
s->slice[4] = L6 ^ L21; |
|
||||
s->slice[3] = L20 ^ L22; |
|
||||
s->slice[2] = L25 ^ L29; |
|
||||
s->slice[1] = ~(L13 ^ L27); |
|
||||
s->slice[0] = ~(L6 ^ L23); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
#define BIT_RANGE(from,to) (((1 << ((to) - (from))) - 1) << (from)) |
|
||||
|
|
||||
#define BIT_RANGE_LEFT(x,from,to,shift) (((x) & BIT_RANGE((from), (to))) << (shift)) |
|
||||
#define BIT_RANGE_RIGHT(x,from,to,shift) (((x) & BIT_RANGE((from), (to))) >> (shift)) |
|
||||
|
|
||||
static void ShiftRows(AES_state* s) { |
|
||||
int i; |
|
||||
for (i = 0; i < 8; i++) { |
|
||||
uint16_t v = s->slice[i]; |
|
||||
s->slice[i] = |
|
||||
(v & BIT_RANGE(0, 4)) | |
|
||||
BIT_RANGE_LEFT(v, 4, 5, 3) | BIT_RANGE_RIGHT(v, 5, 8, 1) | |
|
||||
BIT_RANGE_LEFT(v, 8, 10, 2) | BIT_RANGE_RIGHT(v, 10, 12, 2) | |
|
||||
BIT_RANGE_LEFT(v, 12, 15, 1) | BIT_RANGE_RIGHT(v, 15, 16, 3); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
static void InvShiftRows(AES_state* s) { |
|
||||
int i; |
|
||||
for (i = 0; i < 8; i++) { |
|
||||
uint16_t v = s->slice[i]; |
|
||||
s->slice[i] = |
|
||||
(v & BIT_RANGE(0, 4)) | |
|
||||
BIT_RANGE_LEFT(v, 4, 7, 1) | BIT_RANGE_RIGHT(v, 7, 8, 3) | |
|
||||
BIT_RANGE_LEFT(v, 8, 10, 2) | BIT_RANGE_RIGHT(v, 10, 12, 2) | |
|
||||
BIT_RANGE_LEFT(v, 12, 13, 3) | BIT_RANGE_RIGHT(v, 13, 16, 1); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
#define ROT(x,b) (((x) >> ((b) * 4)) | ((x) << ((4-(b)) * 4))) |
|
||||
|
|
||||
static void MixColumns(AES_state* s, int inv) { |
|
||||
/* The MixColumns transform treats the bytes of the columns of the state as
|
|
||||
* coefficients of a 3rd degree polynomial over GF(2^8) and multiplies them |
|
||||
* by the fixed polynomial a(x) = {03}x^3 + {01}x^2 + {01}x + {02}, modulo |
|
||||
* x^4 + {01}. |
|
||||
* |
|
||||
* In the inverse transform, we multiply by the inverse of a(x), |
|
||||
* a^-1(x) = {0b}x^3 + {0d}x^2 + {09}x + {0e}. This is equal to |
|
||||
* a(x) * ({04}x^2 + {05}), so we can reuse the forward transform's code |
|
||||
* (found in OpenSSL's bsaes-x86_64.pl, attributed to Jussi Kivilinna) |
|
||||
* |
|
||||
* In the bitsliced representation, a multiplication of every column by x |
|
||||
* mod x^4 + 1 is simply a right rotation. |
|
||||
*/ |
|
||||
|
|
||||
/* Shared for both directions is a multiplication by a(x), which can be
|
|
||||
* rewritten as (x^3 + x^2 + x) + {02}*(x^3 + {01}). |
|
||||
* |
|
||||
* First compute s into the s? variables, (x^3 + {01}) * s into the s?_01 |
|
||||
* variables and (x^3 + x^2 + x)*s into the s?_123 variables. |
|
||||
*/ |
|
||||
uint16_t s0 = s->slice[0], s1 = s->slice[1], s2 = s->slice[2], s3 = s->slice[3]; |
|
||||
uint16_t s4 = s->slice[4], s5 = s->slice[5], s6 = s->slice[6], s7 = s->slice[7]; |
|
||||
uint16_t s0_01 = s0 ^ ROT(s0, 1), s0_123 = ROT(s0_01, 1) ^ ROT(s0, 3); |
|
||||
uint16_t s1_01 = s1 ^ ROT(s1, 1), s1_123 = ROT(s1_01, 1) ^ ROT(s1, 3); |
|
||||
uint16_t s2_01 = s2 ^ ROT(s2, 1), s2_123 = ROT(s2_01, 1) ^ ROT(s2, 3); |
|
||||
uint16_t s3_01 = s3 ^ ROT(s3, 1), s3_123 = ROT(s3_01, 1) ^ ROT(s3, 3); |
|
||||
uint16_t s4_01 = s4 ^ ROT(s4, 1), s4_123 = ROT(s4_01, 1) ^ ROT(s4, 3); |
|
||||
uint16_t s5_01 = s5 ^ ROT(s5, 1), s5_123 = ROT(s5_01, 1) ^ ROT(s5, 3); |
|
||||
uint16_t s6_01 = s6 ^ ROT(s6, 1), s6_123 = ROT(s6_01, 1) ^ ROT(s6, 3); |
|
||||
uint16_t s7_01 = s7 ^ ROT(s7, 1), s7_123 = ROT(s7_01, 1) ^ ROT(s7, 3); |
|
||||
/* Now compute s = s?_123 + {02} * s?_01. */ |
|
||||
s->slice[0] = s7_01 ^ s0_123; |
|
||||
s->slice[1] = s7_01 ^ s0_01 ^ s1_123; |
|
||||
s->slice[2] = s1_01 ^ s2_123; |
|
||||
s->slice[3] = s7_01 ^ s2_01 ^ s3_123; |
|
||||
s->slice[4] = s7_01 ^ s3_01 ^ s4_123; |
|
||||
s->slice[5] = s4_01 ^ s5_123; |
|
||||
s->slice[6] = s5_01 ^ s6_123; |
|
||||
s->slice[7] = s6_01 ^ s7_123; |
|
||||
if (inv) { |
|
||||
/* In the reverse direction, we further need to multiply by
|
|
||||
* {04}x^2 + {05}, which can be written as {04} * (x^2 + {01}) + {01}. |
|
||||
* |
|
||||
* First compute (x^2 + {01}) * s into the t?_02 variables: */ |
|
||||
uint16_t t0_02 = s->slice[0] ^ ROT(s->slice[0], 2); |
|
||||
uint16_t t1_02 = s->slice[1] ^ ROT(s->slice[1], 2); |
|
||||
uint16_t t2_02 = s->slice[2] ^ ROT(s->slice[2], 2); |
|
||||
uint16_t t3_02 = s->slice[3] ^ ROT(s->slice[3], 2); |
|
||||
uint16_t t4_02 = s->slice[4] ^ ROT(s->slice[4], 2); |
|
||||
uint16_t t5_02 = s->slice[5] ^ ROT(s->slice[5], 2); |
|
||||
uint16_t t6_02 = s->slice[6] ^ ROT(s->slice[6], 2); |
|
||||
uint16_t t7_02 = s->slice[7] ^ ROT(s->slice[7], 2); |
|
||||
/* And then update s += {04} * t?_02 */ |
|
||||
s->slice[0] ^= t6_02; |
|
||||
s->slice[1] ^= t6_02 ^ t7_02; |
|
||||
s->slice[2] ^= t0_02 ^ t7_02; |
|
||||
s->slice[3] ^= t1_02 ^ t6_02; |
|
||||
s->slice[4] ^= t2_02 ^ t6_02 ^ t7_02; |
|
||||
s->slice[5] ^= t3_02 ^ t7_02; |
|
||||
s->slice[6] ^= t4_02; |
|
||||
s->slice[7] ^= t5_02; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
static void AddRoundKey(AES_state* s, const AES_state* round) { |
|
||||
int b; |
|
||||
for (b = 0; b < 8; b++) { |
|
||||
s->slice[b] ^= round->slice[b]; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
/** column_0(s) = column_c(a) */ |
|
||||
static void GetOneColumn(AES_state* s, const AES_state* a, int c) { |
|
||||
int b; |
|
||||
for (b = 0; b < 8; b++) { |
|
||||
s->slice[b] = (a->slice[b] >> c) & 0x1111; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
/** column_c1(r) |= (column_0(s) ^= column_c2(a)) */ |
|
||||
static void KeySetupColumnMix(AES_state* s, AES_state* r, const AES_state* a, int c1, int c2) { |
|
||||
int b; |
|
||||
for (b = 0; b < 8; b++) { |
|
||||
r->slice[b] |= ((s->slice[b] ^= ((a->slice[b] >> c2) & 0x1111)) & 0x1111) << c1; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
/** Rotate the rows in s one position upwards, and xor in r */ |
|
||||
static void KeySetupTransform(AES_state* s, const AES_state* r) { |
|
||||
int b; |
|
||||
for (b = 0; b < 8; b++) { |
|
||||
s->slice[b] = ((s->slice[b] >> 4) | (s->slice[b] << 12)) ^ r->slice[b]; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
/* Multiply the cells in s by x, as polynomials over GF(2) mod x^8 + x^4 + x^3 + x + 1 */ |
|
||||
static void MultX(AES_state* s) { |
|
||||
uint16_t top = s->slice[7]; |
|
||||
s->slice[7] = s->slice[6]; |
|
||||
s->slice[6] = s->slice[5]; |
|
||||
s->slice[5] = s->slice[4]; |
|
||||
s->slice[4] = s->slice[3] ^ top; |
|
||||
s->slice[3] = s->slice[2] ^ top; |
|
||||
s->slice[2] = s->slice[1]; |
|
||||
s->slice[1] = s->slice[0] ^ top; |
|
||||
s->slice[0] = top; |
|
||||
} |
|
||||
|
|
||||
/** Expand the cipher key into the key schedule.
|
|
||||
* |
|
||||
* state must be a pointer to an array of size nrounds + 1. |
|
||||
* key must be a pointer to 4 * nkeywords bytes. |
|
||||
* |
|
||||
* AES128 uses nkeywords = 4, nrounds = 10 |
|
||||
* AES192 uses nkeywords = 6, nrounds = 12 |
|
||||
* AES256 uses nkeywords = 8, nrounds = 14 |
|
||||
*/ |
|
||||
static void AES_setup(AES_state* rounds, const uint8_t* key, int nkeywords, int nrounds) |
|
||||
{ |
|
||||
int i; |
|
||||
|
|
||||
/* The one-byte round constant */ |
|
||||
AES_state rcon = {{1,0,0,0,0,0,0,0}}; |
|
||||
/* The number of the word being generated, modulo nkeywords */ |
|
||||
int pos = 0; |
|
||||
/* The column representing the word currently being processed */ |
|
||||
AES_state column; |
|
||||
|
|
||||
for (i = 0; i < nrounds + 1; i++) { |
|
||||
int b; |
|
||||
for (b = 0; b < 8; b++) { |
|
||||
rounds[i].slice[b] = 0; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
/* The first nkeywords round columns are just taken from the key directly. */ |
|
||||
for (i = 0; i < nkeywords; i++) { |
|
||||
int r; |
|
||||
for (r = 0; r < 4; r++) { |
|
||||
LoadByte(&rounds[i >> 2], *(key++), r, i & 3); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
GetOneColumn(&column, &rounds[(nkeywords - 1) >> 2], (nkeywords - 1) & 3); |
|
||||
|
|
||||
for (i = nkeywords; i < 4 * (nrounds + 1); i++) { |
|
||||
/* Transform column */ |
|
||||
if (pos == 0) { |
|
||||
SubBytes(&column, 0); |
|
||||
KeySetupTransform(&column, &rcon); |
|
||||
MultX(&rcon); |
|
||||
} else if (nkeywords > 6 && pos == 4) { |
|
||||
SubBytes(&column, 0); |
|
||||
} |
|
||||
if (++pos == nkeywords) pos = 0; |
|
||||
KeySetupColumnMix(&column, &rounds[i >> 2], &rounds[(i - nkeywords) >> 2], i & 3, (i - nkeywords) & 3); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
static void AES_encrypt(const AES_state* rounds, int nrounds, unsigned char* cipher16, const unsigned char* plain16) { |
|
||||
AES_state s = {{0}}; |
|
||||
int round; |
|
||||
|
|
||||
LoadBytes(&s, plain16); |
|
||||
AddRoundKey(&s, rounds++); |
|
||||
|
|
||||
for (round = 1; round < nrounds; round++) { |
|
||||
SubBytes(&s, 0); |
|
||||
ShiftRows(&s); |
|
||||
MixColumns(&s, 0); |
|
||||
AddRoundKey(&s, rounds++); |
|
||||
} |
|
||||
|
|
||||
SubBytes(&s, 0); |
|
||||
ShiftRows(&s); |
|
||||
AddRoundKey(&s, rounds); |
|
||||
|
|
||||
SaveBytes(cipher16, &s); |
|
||||
} |
|
||||
|
|
||||
static void AES_decrypt(const AES_state* rounds, int nrounds, unsigned char* plain16, const unsigned char* cipher16) { |
|
||||
/* Most AES decryption implementations use the alternate scheme
|
|
||||
* (the Equivalent Inverse Cipher), which allows for more code reuse between |
|
||||
* the encryption and decryption code, but requires separate setup for both. |
|
||||
*/ |
|
||||
AES_state s = {{0}}; |
|
||||
int round; |
|
||||
|
|
||||
rounds += nrounds; |
|
||||
|
|
||||
LoadBytes(&s, cipher16); |
|
||||
AddRoundKey(&s, rounds--); |
|
||||
|
|
||||
for (round = 1; round < nrounds; round++) { |
|
||||
InvShiftRows(&s); |
|
||||
SubBytes(&s, 1); |
|
||||
AddRoundKey(&s, rounds--); |
|
||||
MixColumns(&s, 1); |
|
||||
} |
|
||||
|
|
||||
InvShiftRows(&s); |
|
||||
SubBytes(&s, 1); |
|
||||
AddRoundKey(&s, rounds); |
|
||||
|
|
||||
SaveBytes(plain16, &s); |
|
||||
} |
|
||||
|
|
||||
void AES128_init(AES128_ctx* ctx, const unsigned char* key16) { |
|
||||
AES_setup(ctx->rk, key16, 4, 10); |
|
||||
} |
|
||||
|
|
||||
void AES128_encrypt(const AES128_ctx* ctx, size_t blocks, unsigned char* cipher16, const unsigned char* plain16) { |
|
||||
while (blocks--) { |
|
||||
AES_encrypt(ctx->rk, 10, cipher16, plain16); |
|
||||
cipher16 += 16; |
|
||||
plain16 += 16; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
void AES128_decrypt(const AES128_ctx* ctx, size_t blocks, unsigned char* plain16, const unsigned char* cipher16) { |
|
||||
while (blocks--) { |
|
||||
AES_decrypt(ctx->rk, 10, plain16, cipher16); |
|
||||
cipher16 += 16; |
|
||||
plain16 += 16; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
void AES192_init(AES192_ctx* ctx, const unsigned char* key24) { |
|
||||
AES_setup(ctx->rk, key24, 6, 12); |
|
||||
} |
|
||||
|
|
||||
void AES192_encrypt(const AES192_ctx* ctx, size_t blocks, unsigned char* cipher16, const unsigned char* plain16) { |
|
||||
while (blocks--) { |
|
||||
AES_encrypt(ctx->rk, 12, cipher16, plain16); |
|
||||
cipher16 += 16; |
|
||||
plain16 += 16; |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
void AES192_decrypt(const AES192_ctx* ctx, size_t blocks, unsigned char* plain16, const unsigned char* cipher16) { |
|
||||
while (blocks--) { |
|
||||
AES_decrypt(ctx->rk, 12, plain16, cipher16); |
|
||||
cipher16 += 16; |
|
||||
plain16 += 16; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
void AES256_init(AES256_ctx* ctx, const unsigned char* key32) { |
|
||||
AES_setup(ctx->rk, key32, 8, 14); |
|
||||
} |
|
||||
|
|
||||
void AES256_encrypt(const AES256_ctx* ctx, size_t blocks, unsigned char* cipher16, const unsigned char* plain16) { |
|
||||
while (blocks--) { |
|
||||
AES_encrypt(ctx->rk, 14, cipher16, plain16); |
|
||||
cipher16 += 16; |
|
||||
plain16 += 16; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
void AES256_decrypt(const AES256_ctx* ctx, size_t blocks, unsigned char* plain16, const unsigned char* cipher16) { |
|
||||
while (blocks--) { |
|
||||
AES_decrypt(ctx->rk, 14, plain16, cipher16); |
|
||||
cipher16 += 16; |
|
||||
plain16 += 16; |
|
||||
} |
|
||||
} |
|
@ -1,41 +0,0 @@ |
|||||
/*********************************************************************
|
|
||||
* Copyright (c) 2016 Pieter Wuille * |
|
||||
* Distributed under the MIT software license, see the accompanying * |
|
||||
* file COPYING or http://www.opensource.org/licenses/mit-license.php.*
|
|
||||
**********************************************************************/ |
|
||||
|
|
||||
#ifndef _CTAES_H_ |
|
||||
#define _CTAES_H_ 1 |
|
||||
|
|
||||
#include <stdint.h> |
|
||||
#include <stdlib.h> |
|
||||
|
|
||||
typedef struct { |
|
||||
uint16_t slice[8]; |
|
||||
} AES_state; |
|
||||
|
|
||||
typedef struct { |
|
||||
AES_state rk[11]; |
|
||||
} AES128_ctx; |
|
||||
|
|
||||
typedef struct { |
|
||||
AES_state rk[13]; |
|
||||
} AES192_ctx; |
|
||||
|
|
||||
typedef struct { |
|
||||
AES_state rk[15]; |
|
||||
} AES256_ctx; |
|
||||
|
|
||||
void AES128_init(AES128_ctx* ctx, const unsigned char* key16); |
|
||||
void AES128_encrypt(const AES128_ctx* ctx, size_t blocks, unsigned char* cipher16, const unsigned char* plain16); |
|
||||
void AES128_decrypt(const AES128_ctx* ctx, size_t blocks, unsigned char* plain16, const unsigned char* cipher16); |
|
||||
|
|
||||
void AES192_init(AES192_ctx* ctx, const unsigned char* key24); |
|
||||
void AES192_encrypt(const AES192_ctx* ctx, size_t blocks, unsigned char* cipher16, const unsigned char* plain16); |
|
||||
void AES192_decrypt(const AES192_ctx* ctx, size_t blocks, unsigned char* plain16, const unsigned char* cipher16); |
|
||||
|
|
||||
void AES256_init(AES256_ctx* ctx, const unsigned char* key32); |
|
||||
void AES256_encrypt(const AES256_ctx* ctx, size_t blocks, unsigned char* cipher16, const unsigned char* plain16); |
|
||||
void AES256_decrypt(const AES256_ctx* ctx, size_t blocks, unsigned char* plain16, const unsigned char* cipher16); |
|
||||
|
|
||||
#endif |
|
@ -1,110 +0,0 @@ |
|||||
/*********************************************************************
|
|
||||
* Copyright (c) 2016 Pieter Wuille * |
|
||||
* Distributed under the MIT software license, see the accompanying * |
|
||||
* file COPYING or http://www.opensource.org/licenses/mit-license.php.*
|
|
||||
**********************************************************************/ |
|
||||
|
|
||||
#include "ctaes.h" |
|
||||
|
|
||||
#include <stdio.h> |
|
||||
#include <string.h> |
|
||||
#include <assert.h> |
|
||||
|
|
||||
typedef struct { |
|
||||
int keysize; |
|
||||
const char* key; |
|
||||
const char* plain; |
|
||||
const char* cipher; |
|
||||
} ctaes_test; |
|
||||
|
|
||||
static const ctaes_test ctaes_tests[] = { |
|
||||
/* AES test vectors from FIPS 197. */ |
|
||||
{128, "000102030405060708090a0b0c0d0e0f", "00112233445566778899aabbccddeeff", "69c4e0d86a7b0430d8cdb78070b4c55a"}, |
|
||||
{192, "000102030405060708090a0b0c0d0e0f1011121314151617", "00112233445566778899aabbccddeeff", "dda97ca4864cdfe06eaf70a0ec0d7191"}, |
|
||||
{256, "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", "00112233445566778899aabbccddeeff", "8ea2b7ca516745bfeafc49904b496089"}, |
|
||||
|
|
||||
/* AES-ECB test vectors from NIST sp800-38a. */ |
|
||||
{128, "2b7e151628aed2a6abf7158809cf4f3c", "6bc1bee22e409f96e93d7e117393172a", "3ad77bb40d7a3660a89ecaf32466ef97"}, |
|
||||
{128, "2b7e151628aed2a6abf7158809cf4f3c", "ae2d8a571e03ac9c9eb76fac45af8e51", "f5d3d58503b9699de785895a96fdbaaf"}, |
|
||||
{128, "2b7e151628aed2a6abf7158809cf4f3c", "30c81c46a35ce411e5fbc1191a0a52ef", "43b1cd7f598ece23881b00e3ed030688"}, |
|
||||
{128, "2b7e151628aed2a6abf7158809cf4f3c", "f69f2445df4f9b17ad2b417be66c3710", "7b0c785e27e8ad3f8223207104725dd4"}, |
|
||||
{192, "8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b", "6bc1bee22e409f96e93d7e117393172a", "bd334f1d6e45f25ff712a214571fa5cc"}, |
|
||||
{192, "8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b", "ae2d8a571e03ac9c9eb76fac45af8e51", "974104846d0ad3ad7734ecb3ecee4eef"}, |
|
||||
{192, "8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b", "30c81c46a35ce411e5fbc1191a0a52ef", "ef7afd2270e2e60adce0ba2face6444e"}, |
|
||||
{192, "8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b", "f69f2445df4f9b17ad2b417be66c3710", "9a4b41ba738d6c72fb16691603c18e0e"}, |
|
||||
{256, "603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4", "6bc1bee22e409f96e93d7e117393172a", "f3eed1bdb5d2a03c064b5a7e3db181f8"}, |
|
||||
{256, "603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4", "ae2d8a571e03ac9c9eb76fac45af8e51", "591ccb10d410ed26dc5ba74a31362870"}, |
|
||||
{256, "603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4", "30c81c46a35ce411e5fbc1191a0a52ef", "b6ed21b99ca6f4f9f153e7b1beafed1d"}, |
|
||||
{256, "603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4", "f69f2445df4f9b17ad2b417be66c3710", "23304b7a39f9f3ff067d8d8f9e24ecc7"} |
|
||||
}; |
|
||||
|
|
||||
static void from_hex(unsigned char* data, int len, const char* hex) { |
|
||||
int p; |
|
||||
for (p = 0; p < len; p++) { |
|
||||
int v = 0; |
|
||||
int n; |
|
||||
for (n = 0; n < 2; n++) { |
|
||||
assert((*hex >= '0' && *hex <= '9') || (*hex >= 'a' && *hex <= 'f')); |
|
||||
if (*hex >= '0' && *hex <= '9') { |
|
||||
v |= (*hex - '0') << (4 * (1 - n)); |
|
||||
} else { |
|
||||
v |= (*hex - 'a' + 10) << (4 * (1 - n)); |
|
||||
} |
|
||||
hex++; |
|
||||
} |
|
||||
*(data++) = v; |
|
||||
} |
|
||||
assert(*hex == 0); |
|
||||
} |
|
||||
|
|
||||
int main(void) { |
|
||||
int i; |
|
||||
int fail = 0; |
|
||||
for (i = 0; i < sizeof(ctaes_tests) / sizeof(ctaes_tests[0]); i++) { |
|
||||
unsigned char key[32], plain[16], cipher[16], ciphered[16], deciphered[16]; |
|
||||
const ctaes_test* test = &ctaes_tests[i]; |
|
||||
assert(test->keysize == 128 || test->keysize == 192 || test->keysize == 256); |
|
||||
from_hex(plain, 16, test->plain); |
|
||||
from_hex(cipher, 16, test->cipher); |
|
||||
switch (test->keysize) { |
|
||||
case 128: { |
|
||||
AES128_ctx ctx; |
|
||||
from_hex(key, 16, test->key); |
|
||||
AES128_init(&ctx, key); |
|
||||
AES128_encrypt(&ctx, 1, ciphered, plain); |
|
||||
AES128_decrypt(&ctx, 1, deciphered, cipher); |
|
||||
break; |
|
||||
} |
|
||||
case 192: { |
|
||||
AES192_ctx ctx; |
|
||||
from_hex(key, 24, test->key); |
|
||||
AES192_init(&ctx, key); |
|
||||
AES192_encrypt(&ctx, 1, ciphered, plain); |
|
||||
AES192_decrypt(&ctx, 1, deciphered, cipher); |
|
||||
break; |
|
||||
} |
|
||||
case 256: { |
|
||||
AES256_ctx ctx; |
|
||||
from_hex(key, 32, test->key); |
|
||||
AES256_init(&ctx, key); |
|
||||
AES256_encrypt(&ctx, 1, ciphered, plain); |
|
||||
AES256_decrypt(&ctx, 1, deciphered, cipher); |
|
||||
break; |
|
||||
} |
|
||||
} |
|
||||
if (memcmp(cipher, ciphered, 16)) { |
|
||||
fprintf(stderr, "E(key=\"%s\", plain=\"%s\") != \"%s\"\n", test->key, test->plain, test->cipher); |
|
||||
fail++; |
|
||||
} |
|
||||
if (memcmp(plain, deciphered, 16)) { |
|
||||
fprintf(stderr, "D(key=\"%s\", cipher=\"%s\") != \"%s\"\n", test->key, test->cipher, test->plain); |
|
||||
fail++; |
|
||||
} |
|
||||
} |
|
||||
if (fail == 0) { |
|
||||
fprintf(stderr, "All tests succesful\n"); |
|
||||
} else { |
|
||||
fprintf(stderr, "%i tests failed\n", fail); |
|
||||
} |
|
||||
return (fail != 0); |
|
||||
} |
|
@ -1,163 +0,0 @@ |
|||||
#include <wally_bip32.h> |
|
||||
#include <wally_bip39.h> |
|
||||
#include <pthread.h> |
|
||||
#include <stdlib.h> |
|
||||
#include <stdio.h> |
|
||||
#include <string.h> |
|
||||
#include <stdbool.h> |
|
||||
|
|
||||
/* Many compilers these days will elide calls to memset when they
|
|
||||
* determine that the memory is not read afterwards. There are reports |
|
||||
* that tricks designed to work around this including making data volatile, |
|
||||
* calling through function pointers, dummy asm contraints etc are |
|
||||
* not always effective as optimisation continues to improve. |
|
||||
* |
|
||||
* Here we try to ensure that the clear/clear_n() functions work as advertised |
|
||||
* by: |
|
||||
* - Setting a custom thread stack, then |
|
||||
* - Calling a function that processes sensitive data, then |
|
||||
* - Searching the stack for any sensitive data when the function returns |
|
||||
* |
|
||||
* This test does not address data leaked through registers, ancillary heap |
|
||||
* allocations, side channels, or being swapped to disk. |
|
||||
*/ |
|
||||
#ifndef PTHREAD_STACK_MIN |
|
||||
/* OSX Needs a minimum of 512K of stack per thread */ |
|
||||
#define PTHREAD_STACK_MIN 512u * 1024u |
|
||||
#endif |
|
||||
|
|
||||
/* Global alternate stack pointer */ |
|
||||
static unsigned char *gstack; |
|
||||
/* Global scratch buffer */ |
|
||||
static unsigned char *gbytes; |
|
||||
|
|
||||
static const char *BIP39_MNEMONIC = "legal winner thank year wave sausage worth " |
|
||||
"useful legal winner thank yellow"; |
|
||||
static const unsigned char BIP39_SECRET[16] = { |
|
||||
0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, |
|
||||
0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f |
|
||||
}; |
|
||||
|
|
||||
/* Useful for developing these tests */ |
|
||||
static void dump_mem(const void *mem, size_t len) |
|
||||
{ |
|
||||
const unsigned char *p = (const unsigned char *)mem; |
|
||||
size_t i; |
|
||||
for (i = 0; i < len; ++i) { |
|
||||
if (!p[i]) |
|
||||
printf("."); |
|
||||
else |
|
||||
printf("%02x, ", p[i]); |
|
||||
} |
|
||||
printf("\n"); |
|
||||
} |
|
||||
|
|
||||
static unsigned char *checked_malloc(size_t len) |
|
||||
{ |
|
||||
void *ret = malloc(len); |
|
||||
if (!ret) |
|
||||
abort(); |
|
||||
wally_bzero(ret, len); |
|
||||
return ret; |
|
||||
} |
|
||||
|
|
||||
static bool in_stack(const char *caller, const void *search, size_t len) |
|
||||
{ |
|
||||
static size_t i; |
|
||||
|
|
||||
for (i = 0; i < PTHREAD_STACK_MIN - len - 1; ++i) |
|
||||
if (!memcmp(gstack + i, search, len)) { |
|
||||
if (caller) { |
|
||||
printf("Found %s secret at stack position %ld\n", caller, (long)i); |
|
||||
dump_mem(gstack + i, len); |
|
||||
dump_mem(search, len); |
|
||||
} |
|
||||
return true; /* Found */ |
|
||||
} |
|
||||
|
|
||||
return false; /* Not found */ |
|
||||
} |
|
||||
|
|
||||
/* Test that searching for data on the stack actually works */ |
|
||||
static bool test_search(void) |
|
||||
{ |
|
||||
unsigned char buf[8] = { 1, 2, 3, 4, 5, 6, 7, 8 }; |
|
||||
|
|
||||
/* Don't let the optimiser elide buf off the stack */ |
|
||||
buf[7] ^= (((size_t)gstack) & 0xff); |
|
||||
|
|
||||
return in_stack(NULL, buf, sizeof(buf)); |
|
||||
} |
|
||||
|
|
||||
static bool test_bip39(void) |
|
||||
{ |
|
||||
static size_t len; |
|
||||
/* Converting uses a temporary buffer on the stack */ |
|
||||
if (bip39_mnemonic_to_bytes(NULL, BIP39_MNEMONIC, gbytes, |
|
||||
BIP39_ENTROPY_LEN_128, &len)) |
|
||||
return false; |
|
||||
|
|
||||
if (in_stack("bip39_mnemonic_to_bytes", BIP39_SECRET, sizeof(BIP39_SECRET))) |
|
||||
return false; |
|
||||
|
|
||||
/* Internally converts to bytes */ |
|
||||
if (bip39_mnemonic_validate(NULL, BIP39_MNEMONIC)) |
|
||||
return false; |
|
||||
|
|
||||
if (in_stack("bip39_mnemonic_validate", BIP39_SECRET, sizeof(BIP39_SECRET))) |
|
||||
return false; |
|
||||
|
|
||||
return true; |
|
||||
} |
|
||||
|
|
||||
static void *run_tests(void *passed_stack) |
|
||||
{ |
|
||||
if (passed_stack != gstack) { |
|
||||
printf("stack mismatch!\n"); |
|
||||
return passed_stack; |
|
||||
} |
|
||||
|
|
||||
#define RUN(t) if (!t()) { printf(#t " clear() test failed!\n"); return gstack; } |
|
||||
|
|
||||
RUN(test_search); |
|
||||
RUN(test_bip39); |
|
||||
return NULL; |
|
||||
} |
|
||||
|
|
||||
static int error(const char *fn, int ret) |
|
||||
{ |
|
||||
printf("error: %s failed, returned %d\n", fn, ret); |
|
||||
return ret; |
|
||||
} |
|
||||
|
|
||||
int main(void) |
|
||||
{ |
|
||||
pthread_t id; |
|
||||
pthread_attr_t attr; |
|
||||
void *tests_ok = &gstack; /* Anything non-null */ |
|
||||
int ret; |
|
||||
|
|
||||
gstack = checked_malloc(PTHREAD_STACK_MIN); |
|
||||
gbytes = checked_malloc(64u * 1024u); |
|
||||
|
|
||||
ret = pthread_attr_init(&attr); |
|
||||
if (ret) |
|
||||
return error("pthread_attr_init", ret); |
|
||||
|
|
||||
ret = pthread_attr_setstack(&attr, gstack, PTHREAD_STACK_MIN); |
|
||||
if (ret) |
|
||||
return error("pthread_attr_setstack", ret); |
|
||||
|
|
||||
ret = pthread_create(&id, &attr, run_tests, gstack); |
|
||||
if (ret) |
|
||||
return error("pthread_create", ret); |
|
||||
|
|
||||
ret = pthread_join(id, &tests_ok); |
|
||||
if (ret) |
|
||||
return error("pthread_join", ret); |
|
||||
|
|
||||
free(gbytes); |
|
||||
free(gstack); |
|
||||
|
|
||||
return tests_ok == NULL ? 0 : 1; |
|
||||
} |
|
File diff suppressed because it is too large
@ -1,237 +0,0 @@ |
|||||
# AES/CBC/PKCS7 test vectors |
|
||||
# Taken from https://raw.githubusercontent.com/geertj/bluepass/master/tests/vectors/aes-cbc-pkcs7.txt |
|
||||
|
|
||||
# The following are taken from: http://code.google.com/p/crypto-gwt/source/browse/crypto-gwt/src/test/java/com/googlecode/cryptogwt/tests/CipherTestVectors.java?r=20 |
|
||||
# LICENSE: ASL2.0 |
|
||||
|
|
||||
PT=f6cee5ff28fd |
|
||||
KEY=ac5800ac3cb59c7c14f36019e43b44fe |
|
||||
IV=f013ce1ec901b5b60a85a986b3b72eba |
|
||||
CT=e8a846fd9718507371604504d4ca1ac7 |
|
||||
|
|
||||
PT=76cdfdf52a9753 |
|
||||
KEY=24c4328aeffc0ca354a3215a3da23a38 |
|
||||
IV=c43c6269bb8c1dbba3bc22b7ba7e24b1 |
|
||||
CT=009e935f3fe4d57b57fc3127a8873d8c |
|
||||
|
|
||||
PT=b103c928531d8875 |
|
||||
KEY=4035227440a779dbd1ed75c6ae78cef5 |
|
||||
IV=8faff161a5ec06e051066a571d1729d9 |
|
||||
CT=b3d8df2c3147b0752a7e6bbbcc9d5758 |
|
||||
|
|
||||
PT=590b10224087872724 |
|
||||
KEY=507008732ea559915e5e45d9710e3ed2 |
|
||||
IV=342b22c1cbf1c92b8e63a38de99ffb09 |
|
||||
CT=c11a034ed324aeae9cd5857ae4cd776f |
|
||||
|
|
||||
PT=ccecfa22708b6d06439c |
|
||||
KEY=a060441b1b7cc2af405be4f6f5c58e22 |
|
||||
IV=429d3240207e77e9b9dade05426fe3cb |
|
||||
CT=b61ff0a956b420347daa25bb76964b51 |
|
||||
|
|
||||
PT=8ff539940bae985f2f88f3 |
|
||||
KEY=721888e260b8925fe51183b88d65fb17 |
|
||||
IV=5308c58068cbc05a5461a43bf744b61e |
|
||||
CT=3ee8bdb21b00e0103ccbf9afb9b5bd9a |
|
||||
|
|
||||
PT=4c84974b5b2109d5bc90e1f0 |
|
||||
KEY=80ba985c93763f99ff4be6cdee6ab977 |
|
||||
IV=ca8e99719be2e842e81bf15c606bb916 |
|
||||
CT=3e087f92a998ad531e0ff8e996098382 |
|
||||
|
|
||||
PT=13eb26baf2b688574cadac6dba |
|
||||
KEY=1fe107d14dd8b152580f3dea8591fc3b |
|
||||
IV=7b6070a896d41d227cc0cebbd92d797e |
|
||||
CT=a4bfd6586344bcdef94f09d871ca8a16 |
|
||||
|
|
||||
PT=5fcb46a197ddf80a40f94dc21531 |
|
||||
KEY=4d3dae5d9e19950f278b0dd4314e3768 |
|
||||
IV=80190b58666f15dbaf892cf0bceb2a50 |
|
||||
CT=2b166eae7a2edfea7a482e5f7377069e |
|
||||
|
|
||||
PT=6842455a2992c2e5193056a5524075 |
|
||||
KEY=0784fa652e733cb699f250b0df2c4b41 |
|
||||
IV=106519760fb3ef97e1ccea073b27122d |
|
||||
CT=56a8e0c3ee3315f913693c0ca781e917 |
|
||||
|
|
||||
PT=c9a44f6f75e98ddbca7332167f5c45e3 |
|
||||
KEY=04952c3fcf497a4d449c41e8730c5d9a |
|
||||
IV=53549bf7d5553b727458c1abaf0ba167 |
|
||||
CT=7fa290322ca7a1a04b61a1147ff20fe66fde58510a1d0289d11c0ddf6f4decfd |
|
||||
|
|
||||
PT=1ba93ee6f83752df47909585b3f28e56693f89e169d3093eee85175ea3a46cd3 |
|
||||
KEY=2ae7081caebe54909820620a44a60a0f |
|
||||
IV=fc5e783fbe7be12f58b1f025d82ada50 |
|
||||
CT=7944957a99e473e2c07eb496a83ec4e55db2fb44ebdd42bb611e0def29b23a73ac37eb0f4f5d86f090f3ddce3980425a |
|
||||
|
|
||||
PT=0397f4f6820b1f9386f14403be5ac16e50213bd473b4874b9bcbf5f318ee686b1d |
|
||||
KEY=898be9cc5004ed0fa6e117c9a3099d31 |
|
||||
IV=9dea7621945988f96491083849b068df |
|
||||
CT=e232cd6ef50047801ee681ec30f61d53cfd6b0bca02fd03c1b234baa10ea82ac9dab8b960926433a19ce6dea08677e34 |
|
||||
|
|
||||
# Generated by: ./aesvect.py on Thu Mar 15 18:39:57 2012 |
|
||||
|
|
||||
PT= |
|
||||
KEY=be0d465f8004d636d90e3f9f6a9063d2 |
|
||||
IV=748869ca52f219b4764c9ae986fa821b |
|
||||
CT=790511b7776b98be3d0a4861b7f1c8bb |
|
||||
|
|
||||
PT=44afb9a64ac896c2 |
|
||||
KEY=893123f2d57b6e2c39e2f10d3ff818d1 |
|
||||
IV=64be1b06ea7453ed2df9a79319d5edc5 |
|
||||
CT=7067c4cb6dfc69df949c2f39903c9310 |
|
||||
|
|
||||
PT=212c4fab8ad5a7de2361ebe033cb |
|
||||
KEY=b6bb953ba709b450bfba14f8e8c6b423 |
|
||||
IV=1d3793f6b9ceb8d1c70726bc890f1f10 |
|
||||
CT=9a8a46a2e63518933dd3ad846b04dc08 |
|
||||
|
|
||||
PT=e6252a8da5ec441b98ff6dd7176b15 |
|
||||
KEY=4756800b308b81dd66545da527b38efb |
|
||||
IV=530d608c46c3232e7d4b8e81a273c5aa |
|
||||
CT=ef08cbfd9f710e27b1a08ea4d1535311 |
|
||||
|
|
||||
PT=7cce30c186cb13d400c5a61d887763cd |
|
||||
KEY=5e9ccbe75ff87a1f99e2dbc8c570cb36 |
|
||||
IV=0176a5b8d2303c7af2dc492de3dcd56d |
|
||||
CT=f1690baca211fb942dcc30eb1519913e5087f514e12379b8b0189fe6f03dcfee |
|
||||
|
|
||||
PT=9c28d6511c78b09ba0b5a08ef785d0e9eb85f4dd155a9f |
|
||||
KEY=cffb6a9f7f93346af5318a86e8d969b2 |
|
||||
IV=236329b93906e7a0c6a104cea1a27eef |
|
||||
CT=062449c89ba46851d0abf5821077ee80185991186a7e0d949e074d70d7d58a89 |
|
||||
|
|
||||
PT=99d186e261ead6548d65c49f1c14d9bfecebc3c12b763cf2222f72c7a5a773 |
|
||||
KEY=6e297667cde9774762290137239b3010 |
|
||||
IV=6b8cfb33fc855ee679e35adb001623a6 |
|
||||
CT=fbe833fc39dc95d0732451b3e5bdd7ffa7867a5cba88708f5dfb0fe1170debc0 |
|
||||
|
|
||||
PT=2f483fb7f6bf6fa222e45b954885976fe4b4138d2fb4c9f08596c22c62d5a09e |
|
||||
KEY=cab12964a25b8fd43a24b34135a400ec |
|
||||
IV=b3e3385ecf30b6414dae2a1c85ba0b47 |
|
||||
CT=04ad09e78cef9a51b4e4e7fdd72d2c56683dd45d7b7dffcd9a12a012a3307827c97b1a080d01d425ca96f77cd743a46a |
|
||||
|
|
||||
PT=0b820a2524946a48f2a4fd421c3aeadc7c884729a207e8310d589b61382b77beac5f32a1c219bb81d08b |
|
||||
KEY=a567bed68a2068b3a6b96cc201ee1cbb |
|
||||
IV=5f96beb39d4b51c337556c070263de34 |
|
||||
CT=3a730af992be52197f2053ec72297cdba4b0d101f4903750bceafbd3c6ac3ab8663922dbb484e3e4b13efd810bef0dd5 |
|
||||
|
|
||||
PT=4ba8050dba83ec85ceda5a271a119e2c62168f6b50057b8e18ccd62b15db59bdf358f336536be87e85c5091732024e3b |
|
||||
KEY=ce2090cb6c0aca6cb7984377f287b937 |
|
||||
IV=66d7b40f8132608d69c8063583e4f2a1 |
|
||||
CT=bc5b8261ba674e54a2c7fcc76111c464b84376818201fcefc64e6dd02b987078bf90a947814ce4a3fa853fde720295fbdf2ce73fbf96ffc6204af11099db32e6 |
|
||||
|
|
||||
PT=d4da67293f41a37dcd10e8a1699c2916588dfe1177037271da810280259417b4b21aca8ab7e245fcc568edcfa2871f00273b182fcc678d9a5451c4c93b01f9b9 |
|
||||
KEY=c327b6d89dfa6efe9227ea702442bd67 |
|
||||
IV=d3f765bd7c264bd66692db2ed25e667b |
|
||||
CT=9197f802c3ddd0c2b4507b974e4bda3812e5db2d5b58b84ecc37417c11db5fe1867cd46d1457bb2aec4fccc72299642a811fd9abdce8c10ba6a5771b84051f2e2586a3190423298ea285b831872f417e |
|
||||
|
|
||||
PT= |
|
||||
KEY=403e125612a3c864df25d33fd2e115a92b9a5ecabb7e718b |
|
||||
IV=6c52759b95cabfbcd760a818fff1695b |
|
||||
CT=6f1554eaec6b80485360ab40c98a29c9 |
|
||||
|
|
||||
PT=d380e2b6e4a20e50 |
|
||||
KEY=d9eac31f62be3f315dc69cbe509e186351b9a0c45d88d52f |
|
||||
IV=3fda414f2567f3cbadb740df6eaa0ec3 |
|
||||
CT=cafdd53c8c429ccc2e734a0a887447c5 |
|
||||
|
|
||||
PT=e0f103609527e4ac5e0fa875043e |
|
||||
KEY=90c4bcd8837c5f9d4ff1fb4ab0f684db72a547707362c394 |
|
||||
IV=f7cf9319b2e3ea1bcda55f36c81c6ffd |
|
||||
CT=5d5634478a032e80105de73422060555 |
|
||||
|
|
||||
PT=a1a85afa52e22563d250bdc6aa4cd3 |
|
||||
KEY=32fc53388361106b7c0d4f0c06c51b945be7c32a1ae865d4 |
|
||||
IV=443deba1121ffca6233cfe8cfb91586c |
|
||||
CT=d23d7971920a5a482aeb63fbc7013469 |
|
||||
|
|
||||
PT=3611fc42b1dd98b0d139a0d08e479115 |
|
||||
KEY=b4f4092845e12845c6e5546785daeb3fe8249305d286c03b |
|
||||
IV=42f17081fb9cf98db1d51ba2d3b23f1e |
|
||||
CT=3ae0c17c38265486a71953ba9e6129117b9f449d5ca3b544bd65ea85160a33eb |
|
||||
|
|
||||
PT=492b3266db3ae0860ced5e6e3a17bba7839f87ab9ca16c |
|
||||
KEY=36612e6d517e30513ce960682c49c39f71ce6f3733559614 |
|
||||
IV=ed244721b60346b3fcca1b78f2661a0c |
|
||||
CT=616c55c54e67612d2f15f3b3e2b885787bace57045fbd732dde53484f024c915 |
|
||||
|
|
||||
PT=6b80576fd97e848e1368bf3de5ecad7652b695571e1678333ab181dd64fe3a |
|
||||
KEY=1b6fb0dde88526ebda0bd2aa8294b84df9683572a24bd1d0 |
|
||||
IV=249fe074cef7f56bd2c0341ca5e0f3d2 |
|
||||
CT=27cf460f9787316d6f8ebc90c55d2c3f0c074862bc159c89c7c8360f3468ac23 |
|
||||
|
|
||||
PT=0d8fd5d98151e4683f848457e12378bb371667530a3ad401ca292c986fd4071b |
|
||||
KEY=21f0ce40b83c6ca5cd596c9dbcbbb1b1b476a91395062082 |
|
||||
IV=fa339b9b0a8689afcfeb80854f5e4676 |
|
||||
CT=989af942391051c3bfb39aa400a0d2f1996fa012fdef6499796ea77a44fb8c7cdc68fba85b305d35ef7223f4539c64b3 |
|
||||
|
|
||||
PT=e2d090969e72e05b71d934b0f5bb4f0a031ff5bc57114dfc8a0e3fff0ce3e960df5154229e6f03233c4b |
|
||||
KEY=f47237fa70940d9fd7fc0b8ef17a8894e91fd15f6711a962 |
|
||||
IV=a1275bbda866600f891f0f29a9e36639 |
|
||||
CT=9dfc78972a9923eb438f52ad613e600fb26de19db05b320d2f90249758815fd3814ec280801d1400a0fe011505f77a6e |
|
||||
|
|
||||
PT=b41e73401331d1e4e56f07f3321a0daefa7af52a58aac41fbf98e5fc0c7e2fdee0abc48a776a5e260f433c1fc38b9850 |
|
||||
KEY=688ec39a357cb13d3b72b20274c3c987671404dfa528abb0 |
|
||||
IV=8e3a404030538b30982aa2fb8a58a041 |
|
||||
CT=7ea303e19e7ab8ff2b1673c030f2d5f36befe88cbc4bca7cf078e659bbe6007b600abce5a5f7d8b5eb472bad849cadfacf2a1fb464e17c208561893ded8b33a4 |
|
||||
|
|
||||
PT=fa50c902f0ed402d23729a929ab30118d9dee19236f675bdd8d1e6b56b460b8f970195da9adcc847127461f425dec9f89077c640df19cd8705d481389be09d2e |
|
||||
KEY=f14735d4d1f41506ea7b018349b65c0e50d4658589a8373a |
|
||||
IV=faa8954426d6607f13405e6b6ff86583 |
|
||||
CT=141ad5032c2ad7b7b965a8c2ccb99fc4a4761ad6c23f97eb80d57c0a8c582688d605ad754d438d6dc7c90c610a4ad3853f3f7bf782993dcd45a2fbe101375523d5b67274d11f9ddfde7a5cc9178a27af |
|
||||
|
|
||||
PT= |
|
||||
KEY=fbd98e65d01236a3a09598253049e3d0248b3757393b1bf575db732f13824bf6 |
|
||||
IV=7b791370a438a952535d6f3696f0e0ee |
|
||||
CT=b532c481e8ed22df514f2933b30b6565 |
|
||||
|
|
||||
PT=8eaed001e15a75db |
|
||||
KEY=d92c083d5ad52e608ca0d75b9d283f94876091047c0e9e056717b02882629e20 |
|
||||
IV=259835befce40391f02141a44429b758 |
|
||||
CT=e0e9f4101a77b332faea82d34449f8d5 |
|
||||
|
|
||||
PT=024ec54cd280caed6b622498de94 |
|
||||
KEY=ec248aaf11ad59096b5f598e90f02d3d5e65e8b7b46e07cee6056926587f4e78 |
|
||||
IV=c46a2325ae023c3235ab5b71c63e4e72 |
|
||||
CT=2c1f977ce30e95c9ccfa07ee0624ead0 |
|
||||
|
|
||||
PT=8789ea41baeb52bc3ea878bfe54d5d |
|
||||
KEY=93fbb06277227e6cfbc0e7447757987e11b538d38fb6947c9b400f63d5115b52 |
|
||||
IV=f8be3b7d9e9f2a45477facca587dadb8 |
|
||||
CT=790869b63f34cbefa121b058f770dc0c |
|
||||
|
|
||||
PT=d1c0e7e2ee8457db33cef82f7f9d8e68 |
|
||||
KEY=7401cc0d21589de61d1000fedf94a73fc019b1a6c14f7ba0cf13b5e44b7ef40a |
|
||||
IV=bb853eafa6959f82297db301fbec8423 |
|
||||
CT=81b30fbc89616ed499a0e33e3e9e9ea45f1b4139945ad971a89953593b632c16 |
|
||||
|
|
||||
PT=8ae8686ff817493c6838e9a480af1dcfbb03d0ac6d9e9e |
|
||||
KEY=efbd1b62164761727ec5d0339d4c28251626abd69899048d90afdc688fd1072f |
|
||||
IV=354d774268703acdd34764428e469799 |
|
||||
CT=b37175256f657a2ea04513d01adaa9c314833ca8db52ca95c4fa5b795f912bf7 |
|
||||
|
|
||||
PT=99f73de229c53712db4a0e1a5cccb66408827e53a099f89eb4dbd35cfbd16a |
|
||||
KEY=30a67dfb0ab4fd61a18e80f9b297c14b404dfe9dd8feef3a0d4c530ea17b360a |
|
||||
IV=afe7687b9efe7f9b67d575ab8b7a1a0f |
|
||||
CT=59831b5037fac8e98ca34da74b64221eedb8b5772c98e6bae950fa6bbf0410b3 |
|
||||
|
|
||||
PT=c8fe3100623b97a5706d5fe59ad65331258b849dc3d7129fa9b77a256de2e9f6 |
|
||||
KEY=0e7106af780fb866fe5c52a0cb113836d2231fd98bf08dbc02e45d097a5196c6 |
|
||||
IV=1bbae33fe77c2e8e657b9ebd97ffd053 |
|
||||
CT=5c18ad0d264407c760f278db61b4afd2645799bdeeca21f9eab50c3795745bf4e8ffe0f0958899936a1786029b455d90 |
|
||||
|
|
||||
PT=5e8967007831e3560bb4adf62f2a97751c61b05141430c0e8bf558d3aebe872a93637098d0b27a3376ca |
|
||||
KEY=578a76c341b40b04af587635f8129ae9d44470ce7a0d6075a303a0a6f37fd94c |
|
||||
IV=e159c60c1a36a871d977ebf543181372 |
|
||||
CT=c7cb819c4b0cf313d89535cdd96d35e23f524e005ec8cd2911737ff59deed4d899fe12ff3df6ec995f50a754ef1ef692 |
|
||||
|
|
||||
PT=c0e0e9a0730db0c6173a1c6a9cdebd8dd6de8e62ef44f497ed4e26bd09526df16f6f3ab2409a1a96408a4cc85484d19e |
|
||||
KEY=f8df85a16d46188dc75946eeb394c1c9df85f547d9ed8132d7ba0c344f54b76b |
|
||||
IV=b1b3c65347045c5eb960b3537084eadd |
|
||||
CT=d6042d65b723b10cf8bc2a5102059bd147213821513f61abb58c42fdf670c8cab69b072485dcfb91abbdabd4b58fef8a422a93ba05f6fccc567b198a5d2c591b |
|
||||
|
|
||||
PT=0d0e15d6d437c26e54dd789286545d05bb667c08cc04b48d29634fd8c90bf0ab86ff2dd31a7eead3cec8823222c0ec88a3e4736a234e1ed7d4ea2d5e85a1b5f9 |
|
||||
KEY=6760d0528040ed2feb176a7a2d698a8fc50d680ad246fd83e3d0e99a58da96d5 |
|
||||
IV=3f8ca4b356810325c9eb284cbbd3d7ea |
|
||||
CT=61ae619fef482df170d00fe52c10f0f57b859bd3fe1951313f2f62959b3373fa40263770fa2899e96d9d53c47d396fed8f33eaa44daa53a6298b5ccfa51657190d88d7fd166954c742d163b94b92fa6a |
|
@ -1,535 +0,0 @@ |
|||||
# Test vectors for ecdsa using secp256k1 |
|
||||
|
|
||||
# PRIVATE_KEY,MESSAGE HASH,NONCE,R,S |
|
||||
|
|
||||
# Vectors from https://github.com/nayuki/bitcoin-cryptography-library |
|
||||
# The message hashes have been re-reversed to fit with other vectors |
|
||||
# and the Wally expected input format. |
|
||||
|
|
||||
## bitcoin-cryptography-library: Hand-crafted cases |
|
||||
|
|
||||
0000000000000000000000000000000000000000000000000000000000000123,0000000000000000000000000000000000000000000000000000000000000089,0000000000000000000000000000000000000000000000000000000000000457,28b7f3a019749cce6fc677afa8fae72ec10e811ed4b04e1963143cef87654b75,04719f34fe9a47f2c9a22045485f3654dc3ac4a910a7b0b4c7a318f41db65c9b |
|
||||
8b46893e711c8948b28e7637bfbed61666e0118ed4d361bed1f18058214c69b8,ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,d9063703d9f719739ff645c77ba2f9d1dd2b4254dc7b001f8fc77c3b05aef5b1,b4508af745210f6702c687682fd5e8c8d99cd1c6a7ad450ab4640458e14474ba,421ed1256c6056d50a481d76b77cf5aa74a692556682e584a4872e8d8bbbceac |
|
||||
fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140,7f0fe901a21b204797dae2cc6400b6b3c25eb60e26ff666152bdfb40464eefb8,e2ef043987542cd685482e71e57d01a93b701c2610fb03253871dc2958ad3d73,38c2ab97f778d0e1e468b3a7ebebd2fb1c45678b62dd01587cf54e298c71ec43,7a6d055110f4296a85e8122b32f87ad32a58cf9bb73435088102638d7dece1f2 |
|
||||
|
|
||||
## bitcoin-cryptography-library: Random cases with bit density 0.03,0.20,0.50,0.80,or 0.97 |
|
||||
|
|
||||
001201008010802052e810181019014029a50400110020004840808481002400,fdcfb77fdbbdfff3fffbeffe5fef7bd5fff5fef7fe7d9ffeb3fd37cff77bf7f6,6ff1fdebfefb76febdee737fbffbfde677ebfdb736fe773cfffcfbfffff95afc,f4a36c209d0ce07e465000b78b2cb2926c6ca3a81733e41b1d7689c9ef5cbeca,6ffd7fefc46be80c425054544cd0319d31082344065feb719f7ae8766615a510 |
|
||||
10000000000c80007c0090804204001005922008006050400866004000002100,211022080086844040260048011001120002040805b100000524020c00000888,4813a423c001a0081400a11082000042401865000190102b1403008090020500,a0356ca71c2963d61c52fe9481ff968cbd3601a53a4b01d86844c3ea693d80a3,4c8a491953db7630203b67e84c94d16dd336477bec98c8b2f3524bceae5ac27e |
|
||||
841809d88359140c061400800a11553002000000104442081000010401520819,eeccffff7b76fffbffedfef9de675ff4e9faffbf9f2ab6fec5fffbffe0febfeb,80000504b95146424f22010009000200085ed80100840016010004581004c008,32f29fabb1ff6d9fd2ac9c2656c1c9f8a8d08bd02156323c32a9a2231f9c5323,66c7a5bc1cf71c7e3f940b5dcdbbb49e57f2863b523b7c45e67d2a0c63ca1780 |
|
||||
41fafe9b8aed4955413045f361506cc58c335da64450788676844e8267179624,002220942e00411b0481800008004821a480524040d0e601080002020490a890,dffeffffeffdf7dfffffffffffffffff7fefffbfffffffffffffffffbbffffff,3f702736bad513fc7fa555a134ea9a06ac9cb45cfb528f976315f0f6cbdc8eeb,31cd1941849f05b5b93cf3e4da520904aaaccf4e6c9a0ca77d7e693b78c0953c |
|
||||
41f2a151e80b66a970ef7f1f1270efed453d445ccc7b637963303ed25cb49dda,1108012000101290420114028c020831210680880341d35a0411003088004140,b1403b66f532102faed410f01cfadac147420fced4423e3f67e06fec6be019e6,8c85c0d884486fbbf4022b121271d422b973a6a4552f4ceaf76d1310dea2456c,17b55d2407f2ab3abefa684a97f40e5c0a1810fb024d793f2d906170fc12c4b8 |
|
||||
100020805348042222288002860004a241020802500110010081020988010003,08a00100080100526a00008025488804050004214c4005604c00030282001102,bcb1d8373a8aa50a16eebcd40ce56cd174b189a5fffaeb508a1dae403492302f,de228e575f334371621571b1ab55150d9cd5920468a43388d4feee0ead7428d9,33c2c6c69f15c704d9d3a291483d6e6a2695567d2aab5d9709e2a7f8b4ac554b |
|
||||
3bfefffefe9097f95e7faedb5fbfed5ebc78ddf8dfffebefdff9fedfbf8fff5b,e2d2408aaa71354acb6762b9a55b19d8beecbc7db623824e39c616a2a6311399,efffbfefcfeff97ed0def7fff7fb7ff9e7fd3ff7ffede6fff476fe76b6ffffff,eee1f90fe668335ffb4b984b26ba652fda99caad35b7e36933d56e38f1a9b047,7ac52797d71cf478750223308bb020bf56972dca5c90f08729ea869c13e58396 |
|
||||
64184008040308141020700100d0800100e18180960841801804036010131680,cbc41b29eaf96a8deb6cc7c45f4a357be167286dd35a9fc39d3a728177f824c5,1f234be100a5633ef199b7547430ff05b02d8eb8a020650589afec0a3dbea98e,78787e2527c145a7872bacf7009a71e03b7d12faef1a0e64f5ad1bc20338a6e5,6f1e3f0bf8f8d462a70b7eda5d5a50219c4e34769d2709f1beb979f95e98e2d1 |
|
||||
e5e7fffd8d77f5fedeecfffffddf6b77dbe0ff79cefdf7bfff6bfb7bcbff8eff,810000a100221117002a00a41080806094048008108c2b05e604011804002140,f4d79ed00372cc9ee412d683a8b8a16932e6b0b57b3a50088e5074679a28db2a,eed43173be5b55cf9fcddbcb28c0250098cda5a31398c830878a1ee0392772e2,57ffbbc16a08d9e549bec44b466512dccc328ac839d6e87a43a8517bdbe224e7 |
|
||||
8a0104c1800818a014408010100002001201242002002084800280902a002080,8c25014220020e0d1c01800043009008c00000024001101901e0052108000000,9ce9a263c86b8aa77130b0a0bc120636a73c7622a58f1ee77a149f415240320b,404df5d1488875b2e77cff926bcf27144055af958cddbb723e0d91ba572ba1fc,18d24f1be145db9f949cdc56c792c5b1034a5590cb2c77bd62b3a973a4647ef1 |
|
||||
300481c01005a080000a44044042043108110238040040000028aa4004229101,bffffbf79eb98ff55befeadf735feffb3ff7fedb4eee3f1ffefffdfefdfebfff,bfdbff7cdcd7ff7ffdc3bee77aabefff8fffafcdf7ff7ffffd7fefffeffed57f,9c11d60ef10054fbd6f74ec5baebb9f5386fa47bde2c33f49c9bfa3446971ee4,623e138536f793b5e653feb63cb7f3345623fdf6cc69afdd3d7bcec47d709078 |
|
||||
efffff6ffdf2ffeff7f1efdfffdf6ff7ffe27bdfeb97effbfdfebbbdbfdfdffb,a2d38fb7533ba95a3015eba07a3247b562f34ee78c17afafe424028b7728f70d,942082880e410c638c20101200d002900294402200564030040409404500e621,78704f0db5c44f7b92cf354bd0dfad270becb461ed494db2dfc81f728db08dd3,5c0868c05a9db47e7261dd5da78da8d461ca6199f61e010a9fe17d85dcf14531 |
|
||||
fcf9beffdfff3f7b73f77f5ec7ffff77bf3fab67f6d7c7f5ff7ebddbdff3bea9,0ade4527bfac743b40bffa56683bc463ef69f48b6ece67738d5ad3db194e735e,001b9000e8a00a60500000001042819062116d002910443100c3614906804020,c6777c4b2f6c90dfcbf94a46b27c31d5b8055a3fa2353ede771d55f1109c6cf8,67110c133e50f33fe5cceadeed6228cf62755494c1e3eabc1de560ccc67fe8fb |
|
||||
0000000900000000000100000000000200000008000000000000000000004000,14e9acdc8a9a70ea8188a6aee4eaa49a8666027ac7bb33da61a146bf0fec74d2,e095795de203979c6b6e145a6ff99fc843adaeba8eb54fb856e4ef719f8507b4,16d9f4696df004fe3ce7f6bb5f68202748d7c7df7b2702bf098bb6c600eed666,16d04ca0516dea1b56830a3844092cc350be5121cdb3c9321b661a390d963957 |
|
||||
7ff5ffaafffc7f1104ffffffa7fffbfffbef7bebdffdbfffffefe3ffff7cff7f,9c71d0cc68eae1166dcbc977fac93fe61f45d9c777db3569bf2d7a6ddfdab11a,0000000044008280040000400000100010100401022009840000000000000010,41fcc5dd1c54a07dfd06b13752b2a3786f025249edc9e9f1be7153519575f861,1be704e2c379b1bb7dc2a050f375ea90ba1c19b03481a9528b6b47c230052248 |
|
||||
f5ffeb73f1fdfeb3ffefbf7bdfdfabfbdffdffffbedbdaa5ffffc7fff7a9dd27,04bf73e35ea87b27ecf635a66cea12d014ad4b76ad73f15462f94cdee407370e,9d162be73fddcb7ff26f8943dc8c65d2fc6e50ac0aec872a7780c642f0c9c22d,c60c7a14980ac0fcf9e1afd04c014777c1cb9ad3a59dd6a2fc999f96b55fba06,1679dba2c1dabbc40ebf06a28540ad1c981104713885fb521ba51660f17480f6 |
|
||||
283cbe1ee3cb7a5230f1454b03c57929ff66b7d8a7c1181487e1bc6488cb5af2,7e9bf5ff76e70f7ffefe7fdf5d5f7bfdf77fe79baffe5defff7bff73abbe74c2,fa93f6f3b17b9ffbfcf6e1fbbffbffcdb9defbffff5695d77fefdebfff7fecff,0a8d9ce4d311b1ea50f1a2c9c439914ecd9a1d4c2d573f2a2afd5d81229b3eeb,120fb22f0d187e48f7216ff8bb0be0a62dc5c73b35e39187d10817035e319247 |
|
||||
6f5efffbbbfef7fedaa6bf7e5bfb7ffd7efdb776dfd6e4ffbefcfef6b6d5eff3,0000000400400000000000000000200000000000400080028001000080020000,ad5515d6a76339503b9c37253430276806f82181dd3d753395210c75483d2227,a6c26802b17357dcd81f1dd5431b4cb80dc245fdde78d2d782ae77f005886058,63e263286e3d66ae6fb23222c8a5933aa6df076b0902ab7761501a6ce9656d33 |
|
||||
4461050a32afc92024e384c023fec8fcbfeaebcd532cb19ece87e6e177e5af24,befeeeed77edffff13bfc76fbf73f1bff7ef7fffe9f5fefa9ff2ff6f7effbeb6,9ade3242fedb12abf0d8c9967aeeb67c2ac22091becef57d022d276cca9af42b,796ca71d99dfb6077f500841e161c9cb85227f28944e68d4700c3aa9b072ac61,68be8cff32983a7f0148545d0048c8d13ccbdb093d86fa522f50c9aef9a880cd |
|
||||
feff7fdffff1ffbefbaf7fcedfe9b6e77fecffcbf5e5d3fefefafcafef47fef7,3cd46c7ea049bfbf061896c7b8b915da12d8b5c01ec56ad5b11658ead88ee042,32d36b3ba93a65bda7348045e4acd46892686efcfb6ed631e2ed66db5161aa8a,5c11906ded5404015a441fe98ceaf258bab7e1b8596fdb016f60cfba6b44c9bf,4f43a30a834bc3a6f24d7ad170879b983d7ad5676eece74e6ecc5765c21a2b64 |
|
||||
5008808c4202046583026604142001410400008c9304282500c40c14c4622108,04084001800a100d0030c1600532a2143800a014608001008309000030012020,fdffbfe7fdbffefe3dbe3a9bbbfffbffe3b5e8dfe9bf7ff5e7e37efefffdebde,94af37be2aac753b7c16e44b9f283048fd18811c7ea9525ff875309f20c8ced2,3e644654d7b45c680573f8ea11c7c910b802359d019789a13fbc8ba5905a4fb6 |
|
||||
609014024674020c040242002028140001080080050441480000c000a8110009,6ff7ee9ff95edfff6fbbfbfff6f7dfd4fff9fb5effbfeefbeeff7bf7ff9fdfee,500c002a3000221c000c42089008014419410cc3803000210081c04000c00100,cafddf56d27521d1485751015eb501302afe77bd1f39a34a1ac8069b46644134,6fa78225ab7ecc7c412ea82e53ac8114103105fdc97a6d43f2486a3b6bc5c72d |
|
||||
5e58033162a656ab6fe6ab2c1f2ed9f4512d909a04ffadc6d1f80bd97b7ba1c9,a1ef64ef3860ee9fcb998828b606279f14d6c24bedef879fc10fd5ad30733a81,1ff05ebbe255fe29248061d96e22b7a54031f86611dc23017f7e32994a4da6d0,c2616d53191c3d9fceb6c76c13f01c8fd4287f375c776c8ce703f0e822e66a94,7c9f3f3a261a63ca8fd9ee7c9913af8a5d7d993338b32ea1e530f509773267b3 |
|
||||
eb7f25139d2a31744a8608877cbdec993c28973d00bca2b0b6b20e6b66e51d97,dedbfffff33f84feff7fedfbff7ffbf5eeffd9dcffee24fdfbcfff7fafbb7fed,0b3ca97bace085d48ca988dc4eda0db9364055c2b2f42604c034b38c4bdeb3cf,3e2b778c728a3008a4db1631b90fcfe57107fc14da0785864b764001545d2a82,020f9cf58d429fc6b6362c75fc2aff46b37c8b2bac7d381abfce62e53b0a213d |
|
||||
0800001000000000000000010004000000020000080000000000000000000080,42179db98b0f783c14a9ad7ff49ab6ca6a002b49c3bb4ac95627a3955cafad7a,46b9eae3e32bf400d937715b2eae75e33390df25b8a54119c04e4bddd6a4cb67,0a9fc66e53b7ace72bf0ea94a681e3f61dd0a3ea74a0d0242b7dd3cdac0594ef,3025d3773a7a0e629a046da15f9dfbe51516ce5d9636621d20d01968b684ad29 |
|
||||
04008010408a1300000001000943b004040081410a6809509080060800008004,0420620090308c8a1300183022000010da0bc11c0010014291c826c004b06080,ffffffffffffffffffefff7fffefffffffbffff7ffdfffffffeffffffffffeff,420f40642f476bea4c060c6525a6e00d3623e9efd505a27b0feca73deed08fb2,4107b66094e89a5ce85e55bfdbff2e621d0fc1a142ec30fdada30de9e2f30ca7 |
|
||||
101243110001a00080628001a22101000008000000101549b02002484d034804,9b6ccb58e5be4e98000bc9865766c553974ecab20f0ea970aab475466d8bf2ce,bffff7febcbfd7fdffffedffdfddf5fddfc5fbbfdffeedff71fffffebfbecfdf,967dfdaa4ef1c7ae8e47b77f7e2d83ff5aa32a6d53c1e411ddfbdbb2ccb6c66d,7f30e44daf7fa0b6e7b9aa5cc93643a18d640ad1a65272eb3918171d538a73ad |
|
||||
1142000d42402506010040012060800c30800a412010420042d0842088408886,50001012042a1008002472060002021804420006041102804080c0188403a064,64f29c1e3e8981ed7a9e7283af64ddce3be8c39ea15b75335d10ef8c6321a9ac,a78266c29fd92df422c0025bae425132b59e986167e369c7882405bebaa998b4,55f32bf2c3bbaa78992e0307f0e161b45ad36909a2375f993bb18d2c2f5d92e7 |
|
||||
0c250fe0fa74dea0cc48f26953d8e48cfd1fec02f9b8d61bd77ace2571568ff5,7f79e7d6ac77f3fa7f7fdf7fbd7a917fffcebfff3affffff77fbdffb7fff7ef3,586cb228321dcdff0c88c4f9afdc5b495e76a750a4616a008e4890209333813f,db053dbe3f6c06353a06dae53253eae59f0468ea517ec274a2be334997f894f9,588124fb06c1f61f63a7084db79c3e71648c664657de1ab3f736f6218b4994c6 |
|
||||
d067dcfa3f7cb343cae3b485cef1d2a4036ac32c9533cae1d2d960e1a0a4c788,ff5fff7df2ef6fdcfdffff77efb1fffafdfffd7dfd7ec6cedbf3dff7d7fdffdf,76e1bd2c4402a0ce56396585472f7ea88af956d481f7c4877a5d5f66f1b2c72a,f0f29cb126556148b75ee5aa75c648f7d5b2feda56d53f0ae351d4c57d1fd3b8,460f0ee6ebbc03d2e1277de9eb321b01d7f91ec0b7eef809c68da24e5f91cbd4 |
|
||||
8485a05e39edb21c2f61b9661b48edbc80307515f8a41d4a0f9eb971b790ab1a,7dff5afbf6fffffedbf83aff7f5ffbbe9fae8a8ffff7e8ffa6ffddcfdfefbf7a,2dfefef7ff5ffffcf8f7edffd6aa77ffeefe7dff7ffbffefaff167bfafffb77a,8b9ee3f2c2284ef3b53d612aa77b193739905377f780416bc28d4b2d19bba532,3bb383d3c03158ac0d8075b84ca2a5c5dc72f2bdd989fd37bfbfe08570827e45 |
|
||||
fdff7afdfdd9fcbfffdfaff5b37fffeedffad399dfbfffdbffaf7ed6df97f7ee,0080000000020000000001000002000800000004000000200000100002002020,b313fe9effbeedbfffddffffffffffff7cff5fff56ff9fffe77febb7fccef7bf,c2df4de1faa73abd548b420c21e5c5df9c2814c75ed57ccdb00aa32cfb0e25d5,5a89c9bb5f26d029eed80eb8b53123297674281f8fab0bd3879d8e2e4b9f3d66 |
|
||||
40100236083641008200080a440200100a010020a09528820549004004480001,e7eedfbeeedfdfdf93d7f9dd6e7bbfbfffffbb17afeefddf7f5d9deff9fffffb,cceeb8b4f339efb766fc1920d2d2a30d22b16687e8095032780856de556be2e5,d51dc48ffdc6a6e1b0171cc313de7817087561d3368b3acdc5625ad6e7b92890,651bb4851af04e083bdf0823257c5c28ae79661f3dde9d3f13ab1de4f5d875b8 |
|
||||
4045890082490889430a01082011002020082c3000814010198a880806811109,ffffddbefff6fff75bfffdeff7bffffbaffdff33efefe6b7ffffe79fefffef7f,08220222212000000e89244850200084830d0004240411880a1103221200824c,62dfa56c04969c360ab6a33052c6536726c1ea08e0191fb9f6a4fd05d48b4c5e,40bfb7307ac46c87d9c71f09d63e1fb7d8ebb446d84cca08d8add433a5f614ce |
|
||||
fff7ffbd3bebf7dff13bfffd3fa7efdbfb7cbddffff7fdfb1fe1ff7773fecbbb,dfeffff7eddbfadf7bdff07fb3fe7ef76e7eff9d68fede47fefdc5feeefeaffb,6e0de3a2b4591ea98b3b193374fabf6a8f8ac2b1738e08966834c0ea835aa20c,59ddec3ae450114442a651fcdd0f495b640b4a22bac8401536f5ecc1b62c2c7c,07b823b1221c3ab156a3a6de88e528e78ec2d059576122313c62f767e983d447 |
|
||||
17b3520a6fa995f5f870eba05d3537d546c626a54f131c27688b3e34e9fa0171,0000344618206040000b002040005590840a84a0086108001584b38110289202,fa957d9fc247dd308fb4734120384f75e905e8caed13cec50cb23cf387605935,f67863f04e3c642831bd89aa583d71c5d689172e044b3826b353e095d79f890c,46472b986e61a2a4a98d117e9e6fb19b0cb1b5da93fefa804dacd3916398c179 |
|
||||
0003040488a28011440c0000023901010120400208128202012822000010033c,afa8ffef73f93ffbffefbe79def6dffe3dffffeeffdfbbeffeffb7ffdfb7fdff,78000000054909010d80161a20340400211000810d0414a00212120402400028,6b4034fcf207e465170b3bc7c1f06c0a329455e8945f4e7ab013c64d41527e1c,02149314feb69abfa122d093271606aa5ab25737fd9b122f36ad848b44df4558 |
|
||||
3a00a1450040207098402002280062300000a014801058080034554920284800,3d9904677d909731f262936cd18624eebb0a84adcdc9c3b6360e02847d9824a6,ebd7affbf5dfedf393fb3dff7ffcf7beaf87ffff73ecbf7bdfeffefeaba6f57b,acded71943ed97845adde494d67de35ab92fa3d36be835f9a8053bb4293d05e6,562fe5f00b87899eb26cb9e06062629a7e2ddcc1c5e3562fd025a925d9a929a3 |
|
||||
ce7dfefffddebfa43bff6fffff95df77fb79ff53bffbffbfaff7ff5b3bcbfbfb,9a0f20225a65df0df1e380eecb90e43e2007b9a0c7aca27b1629e1841312d2c0,b5b61aa397cacd2367830db76055cf90789148e7304f8905093ccbdd3cc9fdc1,318b5fb1feebac3d61ea7c9ead2ded4509de316c9885395ca64e4602c29318e8,299bfe0cb4a60419125e5fde42c868ecdd16f5c61fa06c0dac5c3642d55dce20 |
|
||||
d4e8a77f6e94f4a426d4131d4ab6bf91605648c7ea1b070bdb98d0621330d8f4,ef7ed7f7fcee152e7ff673ffa7c7ff7fffdb1dbffeebffffbbdf9b7a2bfd2bee,fefbfefffd7fb36b6fb7fdd3bd3fff5ffabde73fdbffffdae9ddf67fb75db7fb,3766548ecba1ac8d5d4190293b8efa4fa4acc8ab1bc2f9238da705bcad15db0c,19066fa91b681aa033aeea225d5d8f15d41417d69a3cbf83ffc7d4a56aac72de |
|
||||
0034002000200e000c21041cda080304a000863000024210000a194211030208,0814800000610008400b048064001500000a40680c01280032c4800247402000,08801081008010400d1200e0c000a0530011100c000824a900a18440402240a5,0359f41594d589f10466574f82cd72707adf0d37c7e32e102d2821bbd7819f3e,5ba072d6e71076f86568ac9a8004fc7e8ad621520d8639ef591a634657577f25 |
|
||||
e949fbfda63e13a97bec70b93c95ff450a85cc838b7c7c07f7427f32a2cdb8ab,fffffbfffefffffffffffffffffffffffffff7fffffffdfffffffbffffffffff,3809d00420c2a466020002490861414823201068000000098000401014341800,224bcf63a1aad5f423607984f1260819940c289b85319bf64c078697e0abb891,55601fc8a9d83f28d4aea208b4bdd13332882da8a676b97beeec02654f869f1b |
|
||||
9ddb3a53deb2ead7f325df8c666c491a8bb72084e19b55d5b631c6dc38af3266,0002000010000000000000000000010000200000200000000000000201008000,77bf6a3f667c517e4c74bcd511973a97cdbfd75cd4ace1a3d09f53c10ddb8851,ac440d0a1c2971c950be3bf0079f5c37212364775dde44b29f49e6e1872c04f5,5c062e8a55c8c386ec6af116f5229c1a2b5f9fee19be0971752f85cb06173b6f |
|
||||
08024233024001090141400308e031204640001010402880c180082066062104,446d793590d707c1e85fa3ea5728cbac1cdd95c7f801ceb539c79305822d5c7f,f3e5ff7ffbcfe763b8fbfef79b4ffbf779ef7ef5fe3fdf7ffdbbbbd7df5ff5f9,e983df64ed6490929983a9d8ebb3bad964826dbf19886397de44fb8419adde48,3aea433432b284f210c0482521bcd5f558447c99188ac0427ad7e5aeb37ddcf9 |
|
||||
fbb4fffeffffff6bbffeff5fe7ff7fffdfbfbbfcf7efffb6ef7bf7ffd7fafbfb,0000000000000000000108000000000000000000000000000004000000000040,f7b7ffbf7ddfdbfe6ff7fe9cdb4ffffe597b7ff9dcc77ff2fff6bdbafcbdfcf6,fbf392c938588ae5e81b2f6f5435a1d7a8be8308bee289f52265f4f06011e40d,116d143f6312183267c4fee847d73c658de09b770382cebd15b31285f6f1f0fe |
|
||||
2fef7f7fcdfc71e7bff673ffd7ff6fbffdefbffbff7bdffbaf3debbf7fbfefdd,150109f05180b2004684300022200082c484480210880a524a0107a12c00c602,71309044011403000e594000e9120888001208d821000a8446015201188004a1,68c07e995ba21e4ed05852b837e68b421069d790e643ef9ff08260cec7fd6848,535bde5ea8c69f96131bafa55309c8b6084b1146b1cd1c4d0b45d0dcae64376e |
|
||||
f5fff7ff7dfafdef77ff7b77ffefbfb7bb3dbbf9eb9fbff9e7fbfdc5ffbfffef,e75cfdbded9e3f7f9ef3df7ffafbefff7edb5ee7fda7dffdff9ffdfffbefbbec,2092005801400099810000a1128800846012b828050800081281040020441640,b92e00f54ea7b8478710a3ded28d36912dc0081ef0a5823b45ebb7188478907f,2b57200755810d2e557d93c0cf4b29bf9fa5b15d42cb308aca15916697cfda19 |
|
||||
240a4121f0a574538ff30a622918b814874c658151e53840c7bccace1c694829,ffffffffffffffffeffffffffffffffffffffff77fffbfbfffffffdfffbfffff,f4ada16fac2400d6daeb627d14c2640181c5ca13edbd0c0f766286d3571a837e,1350d44e87f76e8de1a53fcb2433dd8d568ad5ae9693fe29a02e6d3738b9410d,3082a4abbc21ef94310eaf916f5226ab91c7e856f46449a1e7a07573ee3aa599 |
|
||||
91324ddd92dac412d16d974341c0608edc983fec24f6b54823046e46a84f94b2,00020900058824110b0180018193245804b00040492300841040110a06400001,034454380004738060101a10001a000482080b41c10105100311200090842110,0dc083174f7f7e9a4d077e7f95369c5f657b4e67379ceeb2b1b0b375257c23b7,597fecda494a3e535e858ec0940ea80840b845d508cdd08c091d30cf73efac8a |
|
||||
d0b08257db15cdb776c98667fcd6d8aa3d16f1cca2702ed895bc27f9170cd17e,9020004120000900020000a00200160410c010d1400205400a00010008820050,6458929d1fce3afc721a3a6e0fa69ff7366aa19f81fc6077ad68d93f9b544c1c,9738a01c4cc88ac9e6f5cfdd1dfc31ef5643fe54a194ba85195f5506ad54a728,2b1580e671d71b3b677e54847d5bd32b83e914cc59bfc077c39da3dbdee78e9a |
|
||||
005a2c59c00a2041400420802049c026011011010021640244a820000180884c,da79ac73f6d0921f893dd44a741fb7d60c020efdbe158d06d8d3bd22d666bdb7,ef9feefff5fdfef3e4f78df7ffedfffb7eef7bfad2f0ed7ffff3effe9dfbe7bb,20b738374e13b4ef09bc8a23d55c99a29c1b8b1e117754732e73728c5df2e31d,23281023db4c02101f75be9b32f9f37feee2fbcd096fa9ba08f1f7cf725bb3f4 |
|
||||
03062808080c8801090101101290500884000980d0602000071640024054040c,2e812d0c96d61ab5cb6cc9116b3e575ba07d93ed6b29142e91add3f0e40b6b68,040804008286008201d01531008040020088404a100600520020210288879a21,a9eefb464b4705b1aa492cb01f3a3cfac3da4a8adc0dfa082efdec8d64a6a3b3,4dae79a3cc261eb4d077fd493ba6924d5ae2a64662fc9d2346e704e6ed97f62f |
|
||||
8d84b7778e60ee6bed2ca6bde7c6e8d7f6c9889a9aecef334e53468f0ada1fac,cdffbf785eff97bb4fdaffdfbefdfeeefff7fd9f6ffffdfdffbfeffbfdfbf9ff,efddeff6e6dfd5b4ff7fffdbddfaeef65efff39bffbfebbeedfdfdef8fbfefea,c4f84a193c294520c67d1c8f3957a5b9c2cde0564b88c77629a052b4ae3c6307,26e65498b837f89bb65eba0cc52a5db522284a32175177f8b8f9461ebb749b66 |
|
||||
615cb2b932e496ca9369b1f0b95aa7428225013b47e7124c7ddecd61bdc4d6d1,effffebbefbbffbdf6fecefffde7df3fffafddef5ff3fff7277bbfcdf7ffbffb,20a0360800804842049048004805c10c0100000101404d020049502036900210,a8fef74459bffe425e674502625dc0efbee1e0553470ca5746545be4bc141fdb,40afdb57c6c8d2d94d222f5ebdf872f8470a98a479715a6087b3b2b15a9aca4b |
|
||||
2dda30693ce59f362ad374196e143ba0c452e969d1e6397d2648defb3c72b7d9,5769a1fd51218ff6c9ac78742680e8d747a85e36a93797a50eaa6f34b318cc01,7ffddd7bfefedec3ffff677f9fffe3ebfedffffff7fff55f4dddfbf7f3ffef3f,80e91253b9f25e8c56a7101a2cafcf990cca63828dbfcfe3c0471936b5dd2263,59bf2a45031e0b5f00b75d4567e96b1a4d0d149734118bbdc9d7fe24e6145e11 |
|
||||
0f9ad750e07293070c237730590a29ce28466cfe08de2d8e62bb31fd66513a4d,9bbf67f9ffbea6ffffd706da6df77ff77f7fefff9f8fddfecfffbffe3fef95e7,fb5155e7b7defdffffde7e97df79d77ed2fcfd567ada9fffef9feffbffebefbd,36ca17164a2fff7bcc8cdccd35004173941ab2e32e32fb42452c48ad482b5476,2bb50003ff53e0d9f4553fc584402e18cb72ba633695388c6988250cf0896cff |
|
||||
79fafffff5bfbfe7df5b9d7fadcf7fff7dff3ffe5eefbf7dedeebc9efffffbff,ddffcdf4bfffafe7c1f7e9f77e7fcfbff6fb97ffbfcbbad57dfebbf5bfbfdfee,47ca2e42e84e960cfae622e72bacd48674dad1d1c3365cf3869341a583084bc4,188b80edfb329b9f2cfdbda8dca5afdfe7764bd226d97f24b850ff69368f7ac1,2fad6aeaf6ed30b22701f93bdc67e75b5ad77be9d4e5528929fa91e9f20549c4 |
|
||||
092400100544c1223880a95802000041460b0413422002920014500500001440,75a2e3920f2445fc321c231ffe9f93ff692e19bde55a389e98cda21b30681a14,fce3d8fbbfffb7f7eedffbbe2ecfbffffbff6fe3ffb5f3b55fe7b75e7ff7df9b,41139cd2d574d538ea93773f8cc56a6aaa9e9a071d0d5408c95db28c4674b186,03c6d40ff08a461fbffffc22bd878a4f6236907321ef279d12059532f19bd461 |
|
||||
8efdbeef1eddbfffd7ffbf967bebefffbebabfdae7c9f3ff9eff7cf8ffff6b77,223fd541d7754509070e82de03d86a1976e3c62a023d4a00181caf76f994a7e3,7b915338278e85fcf773995d7e7d97e8c55fe034f13b994936990720f7ef791c,99ead8653accbf6791903834f45eb8c13731d3f82086a4ef67403712cfecddac,45f27cebc0f77fe35a83162369b3809239dfa4408bade2aab3f68c9f0bc851ae |
|
||||
b9f1ffb6ffbb5fff9cdeffdfdf9e56f55af75bffe7d5ded9fef95ffccdfefdff,974afdbff7b79f7cfffbff7f771fed75f7ef6deffeffef7ffa6bbfdddffffdff,02820308c188282c04a0a0880008004002c8a6810823e0b440a30c42b0320200,c6def593180335f013bbc6edf324a051e434e4947ff218757130a20eb4fde47c,75cbe050e4282a6c1d7b6b07a67369e4b8405f925e64720b3de47ff1492d8362 |
|
||||
05de87564ffc37c1f5404106d8e5b8c2ebc57c10331fb69ed467031a50c6c89e,0000000000020000000004008000021000010000000400000000200100000080,4eff777ff73fdd7b7febf3ce3b77bdae7fffeffdffd6ebdffd5bbfeeefd7f7f8,bf4ff48eaa8f3668f3b8d1df0eca9eb1b4ca5f2265e9cdd473cd137366b8291b,4774ff959959647e1152abafef7d12162d66f9257d89e5902d7c061fb00dd0cb |
|
||||
01007000408200200401404002402220c142a0007620800000843004268c1542,eedec779f7df5edb34d3df7dbfbbffbfbffffbb2ad778f77d3bdbf779ffffadd,81f3bfffefffd7ff9dafdd7fe3fec7776cff3b77efc56f7f6fcfff2ddbffff9f,dcbedfbde9a35324f5f8874ba23df193327597080775d25927af0c45df86174c,436a7a87a4a9bd7aea5757b778c80b12c38324b8b057a74206fda9e2f1faa1f1 |
|
||||
bf7dfdecfbfdf7ffebdf1ffffffdedbeffff75efdfdfeffbcffbfbfffb7ffffd,9fffeff6fffff9fdb6ffffd7fffbb8e7eeffa8fbdee3ffcbeff4edffafbfdffb,c0f97ead8294fdcfe6a3edb6c9e342786716335dbb72956207c73ee700f69b1b,7e224e35a8cacaf191ddbc9e7f42e42f8061d003669abc73e3d19c883929d4a9,2314306286146ab0ae13b2899931f66609b4e35ff4f04162bbde71c216e5d48b |
|
||||
5b124d3b42be0e0ae2631c4e72166f6444d985d9e9e77126a92c45a2a1f7d550,bfff671feed97fdfdaf57fff7ac7fffff7ebffffcfebe1dfd7fbbefdadfefffc,020000c400020002604415c02001030001625b0088000e019400078a04050311,3837dbc605a980c51ac965cd0e258343cac591cd06aec6a7325aa73d8c1bea91,4dee9666f8a6b429af018dfa3663054d6e13125a5fdc6f8ec6f86785e99ae80c |
|
||||
c7718502444b526a508b1e96acec6865b5a074ed3930aa6ce2aea20e82796eb0,9544d6a515a80e08b10c0c976188a9dc67e68be14dff8e4c15fa6e1b626d8f9f,008c000405044a081880c20308004140288001106c02000a002c00c420528844,e44c5b5952eb69cdcab135b20af9982465491fea2f535920b1dc31ac4c83cf9d,61b56fdc23311047ed23029d0b1e84a7dc15eb3ed7eceb37b167df79eba9c98a |
|
||||
deffddbfefe5d7fddad7c6fe7fefbddb36dfeeefe7f3efbd8fbdcaffefb3fff7,febbbbdbf7ffd96bafff7377efff07f9ffffbfbbffffd6dddf7d9fffacbeff3b,53091a400080300480600601210004c0000798082200201000404cac01484010,cef0b8db048ab57563429a237510e5c1c748411cba1fb10259cd40b56255dbad,33e82f9df5e658858b46ca2340f194e7299c8eab72f730b7de523243353fab65 |
|
||||
265d572c2585e99e7619d322289a0eea967adaa5379f3c2ea6fae1c132cd4f88,080a03128028140a040040b88080123d0618200c100000c010802a0048783040,d87f7dbbdfdbdebffeeeffffeefffbffb7cf7f7f7dfdffbdffdfbdfbfbfffbff,4cf2cdf55676a98a9a3fd8e44d1c9248d860ec6aeb1a04223536ecc8939f4765,701cea932159ca069f56b164c1223dde796eb27293c5a2cb9700f76e2c6a8dc4 |
|
||||
dffdbffa7f7bfddffefdbfffffeffdb5fdfff778f7ff1f7f8bcffe7d4fffbf79,16d7bb7ff2ebddf7f689bf7bfdfa7f7fffff7bafaffffc7ff7ff7be7f57b37ff,07018024530a11041a94080438058158844a818006092490cd0a420038004001,09f4165d4b81c7869828f005d07ac2b236b86f0b66e9e1986f9cb63a9f02818b,1ec21626a40a60276deb015d4969f9c233fe1348409073b0c5c7441b6ea7958c |
|
||||
1030118d11888011a8030b63005110c08c004089c000030001a1090518000c20,8c162a7f1a09991f5db2f4307e1fb41e899459260581b6df1fbd802f4dcb614c,feff6fade7fefef73fffd7bcbddf5dff48e5fabbfbfeb649ffffffcdf7bf797f,44a41ec47d7c19500662fd86eaabc942d0e582e6c387cf3eee2c0caf98c3fcba,6ddd79823fad6b2425dde5df23b73503ffccae375e54d83a6c4b1ca97e4cb21f |
|
||||
800040200000021400000000000000004000000000000000000000000000a000,deffdffffaffdf5fdfc4fcfef7d7ffed7f6ff3bf3ba7fe4b7affdeadffffb7ff,fb7ffc7ffdfd6da9efff7fbfbfff7fbfd67dfdffffffcfb7efc7fefff5bffb4f,768bf43114744c0bb377ccddd588cb7fa44ebc2b13f0b13b81e1c7ea194e4a90,7e8982cd2dce52ca7a0eb2421efbdc6ed58d9be212e2e34e92abb1e4904eb3f0 |
|
||||
9cbaa93d15155313e014b0c1ad07dde350ce2f6bc1f4ea641be1717a70a2527c,bbfbdfdfafb379aefff3dffdff9fffed7fbf1bcbf9bf57d3ffe736ef73ffefdf,5b23b1b11b1dd70ffe93c601b15b2d135e958bb5a0c2c6685dccf5cefc5158cc,7a2aa1824129667a3265bfeb87fbae5f9bbdc27b23f740b334ff17f102dc14d8,1c86e49968d526cabf72dd927809843f2dc69032ff2848bac78f56f6aed15634 |
|
||||
a34825f0084e22d6f1af1e59dda468b224af44b61a1a7d676cf0f5b6e1d1084e,1501080130c2024a80c180880076a06000000060081006001004008200092000,0000002000000000001000000001000000000000004000000000000000000000,278d8a81a59a1a4c72b59b33adbf140401239a5c1e7afbd46b31c913bdc6beb9,599d64dee9ed6d76f3f2ad2b3a720c941e122c69bb1f89736471a45bf34cb1d4 |
|
||||
080040800910024010001600608020000502480288904a12400285800c000600,6773bfe7fedefdfdbe6dffef6ffeffd75fdffcf7ebfb3e6bdffbfdf9efa7f7ef,d63e5d9c21d4c5a9cd0abc65e63a2b1e5abda34ee981fe07c52bf648cdba5699,d4019db24f7896c7152e90091f10ba5f125ae5056b517485e6d67eb7fcb21022,7368d2ac9ae319b0bbbfbc72891a4a5184f3081cc7322b363f6dd2cb5ef35440 |
|
||||
1fffadc3bca48d01226ae36a0544fccd652d42ed8523819ed4b873f4062c4366,220829833108000009150c60014800550008004000012098020058a0144a8201,0e0281222a0110008014204a0006008443291000c42040002050000080218002,21dcee15ce5204eac49ed83638986b51d21943ab91fb28638d8396719291e0c3,1d7086215118d7668935e211929312160af0ca7bea7ff8c647565328e58f3ad2 |
|
||||
0620c4004400020444221900087545020000e1200a8029841821000850c02010,0000002000400000008200002000200000008400000002000000000040000000,777e24fffff9cffe5a7dfbddfbef3bb7e7bffffeffbfff3f9fe7d7fff7fa0cea,680fbf09946dc43a6aedb12c245a4e90c2e788a3e2ef8c75abe965566341503f,17c3f728a4d8c74c11890622e2daed44d83380b036170f90bce28917ae18c9a8 |
|
||||
57b14ebac37d2baa54938ffee9dfcbd69c7bb96c12f2f2b3b7d76d02f605c6b5,bf2fb9bc7be33ed6c87fbfff7d1e2ff7f7fbfbdd78f1a6fbff7ffcffbcb5bfff,ffffffffffffffffffffffffffffffeefbfeffffffefbfffffffffdfb7fffdff,b983960721d337b869209af52bf1b626ea3da1351aae3ff0b28f465c58e267c8,5361f7121679aa18ad52df07b73a567ca24fc5599ccd68a611e3c4df8f011f36 |
|
||||
e5bff54bff7ebd6ffdef7df7fadfdfffee3fddffbfffdfa3f6f5eed637f377ff,0000000084002000000000000480000010008000220000000080000000000000,f779f7fef9d95fbbfbe5dfbfffaf5dc7f8f7fff9a07f3ef7ffff3dd7f97ff67f,5a102dabdfb7a4481c5fc541f4ae5048419027a85928d2d2fe73cd35639ffb18,7abf5471517859c9444d71cfaca2f816b90e48513a957aa8f4e2bd7d7371cdff |
|
||||
1da9b189c0618431028a3db83a4b5863e0099c9c2ac355893f7d37c814ba8e7a,f80b535c4b0518368c2b1ee8688b5c05b4ccf880d04c8fde6dad78b08f0ffb1e,fedfcfffeddf6f2adffedffbff7feeefdeb7fdfeeffb97c65efed7febbffcbf7,567d2fd26a761ce17edd698fe8e737ecb5fe04ee6cffeb4da2117bbe14d9ce4b,4ec87ba466219983c7d555b612fbdb5c9776bc16429e9dda2e9f678d6bab8c15 |
|
||||
97ed3f9816e62e72dc51ea26a841e5811ba754b3ef0887f949fcc132f92d86ae,ce41ef1939b09545f777498823caaeb96f43553f30e44fae6a9276be4e3c7e7a,f52b9e7dc0d8988d78ac27f5ad26c8237c05a44ae7d0ec9b34e89a50199b05a9,b363d83db9c668a129ed7dbe69d5fd723d7381077ac6edaf633002ddc6343f36,768b18d72119e65bbc066b880f8be08a461cde21adc7db854ff2de31ad345011 |
|
||||
72e11856bc8ac3d2b931065087fcdadca4b6714e1092a863df6c2f09556c9b0f,230040005320486280008c111042800142405098a0004081200011188901a44e,102020048148841120044148101040008b083c81800800811400a00500160154,595a49facd7eecf8f966852c22a0f51928696ffb907be8378201fe382c867d27,6c0932ebeda51d11cc04e340b6b5748b5ed6b74306c82ba8daf4d438070fb9c7 |
|
||||
093b02d9e8e778d2876e41c321135388fd3617f1a8dd99f5bbcc928ae3ef4d4c,7efff7f9cf6fdcff6e76bf77cfff9eebfffdf5d53e37ffafbebfbfefffb7ffcf,860020640410012000002465400025c40200808018d0000000416c80ea048830,afa809a96a82defc5508da355aaef0c8f60ea4b9cdb7549ffe87ce348c89aa25,2b217bf7c177d209e0102e29abcdf0ce1a65e28b317762a8031a2e4e90f47a06 |
|
||||
fefddedfff94bedfe7dbfbedffbeffdbfffffbcefffffffffff873ef3fff7b31,bb39ddf7fffbd0def7fbe37db7bffedffffffbf14eb6f5e98affffdcff4c1739,aa2ccad620037b769fa7218629fa1db139e920bece633cef71ade76b5bafc4d3,a15c5d12a97cb3eafe627987e1076753fefc8ab268b0cea49ee78895ed60976f,53fa2f93073190d22b71b634fb972ee73f2bcad25c90fb43bdb1b94f03cb9e63 |
|
||||
bafff97bffdef9d17ffffdffff1bf5d55fdf7ef7cfd9cdcf6eaeddffeffcafff,9e795e585d977abf2bf30d6393050772f4748ac5bbded21628d413c9b18d9409,010010a000000100000010000000000000200000000008000000000000000000,cdbe5fa3aba77657300d12c9132c128170de3df7f558270d52b0f2cdfd30dcd4,3037d14f7291704d2727ac279976068797b4268eea502cf008d39de7be4ba5f8 |
|
||||
65f3181fa465545d8604cf916ee8c1e904bf0641a6abac0fc4c8ea2a36fcbc28,fdfdfedfff3f7b7efbffefbfdffeedf7bfff7b7ff7eff7fdcdefeffe3ef1fffe,202404e0482001448051050840a022024206004082d00006202080412451051e,bccb4d3c61fcfe698be3d7512959f6def1b2708cfef2d2e475fa31a8747beb80,3611c8ffb9aad725e95e48ce98d412004197774c2ac48bc331b8ebd1069cc177 |
|
||||
eafcf6750f9b043c6a3dc029d4fbc817c24beaf7da277fcda1eca5dda11bebf3,75926910978aadcd034b15298e8faf70cc243d711a69a4647b55bbd48444139f,1572ca8a8d40ed7d6f5e4069871fa7e24f1002cc9a84cf84e303b1266058bc15,18f2e81f0216a0f15d8070d81685970195eb0d922dccd3f52e9a2640bb625a88,1ecb6a62ee41c6bcde1cdd5954dfb6926f3f33d620ac2ac3a2dc41bc101366aa |
|
||||
0800000000000000010000000100000000200000002000200000020000000000,7ffe6ffffff7f75f5e2effb9defe57df3ddaef77e7fffdbfbddbdf7bfdd7faff,7bf5f1f2fb7bfffffdd3ecbf7fefccfdf56bf77ffbfdbefeffebeffcb77be557,145e1dd1a080cb06ed05d28326075683101a5b4993bd38c6fabf66b70525cf2e,0cbbbc5410c525031dad8c25b28bad1e04ba1bb58b6531c0297b6207757c3acb |
|
||||
dfb7fff9fabdfaff3dff7ffffdffbffffdfeb3ff7e5f79dffff6af9ff7dfcf59,cf3f4ea22099c1588a2f48075db2a39db27a6c2a943671ddda6b78a9e4f1dfb6,d7fdbffdf7bf7fddb1fde5ff7f4bfbff5fdfbffef7fcfefdff7cffef7ebf87ff,904ed68bc2cc9648db6a09e6a224fdf4c0d058485f5603d071d012bd8ccfa4ce,61ac2cb7157fb39a8b69457382684cf299568234780a80d733ccab72014183c7 |
|
||||
47d178318239c438d0dd3b2039983b01170829348bf742cfb04e2e56f2791c5c,ae777fff8fbdffdffffbfa3c7ff9fe7f2fdf3bfef7fcfddfb1873f5b5da9fef9,76e7dfed36ff33dbffffde3ef3eacfff67ce9ffdf6e9defadfe37df6ff7febff,6bf88d305acf4b44651478c10552b6b681fb8613f891a76452402ef5cacf68a8,0ace2d1a567a66c1fd8b13e79d393d1508a79c234b2069304a3377bd8340607e |
|
||||
000c400030001a28500104000209001c805010048204418ec00920429c009001,3d1b6ff61558f100df61d063213b857547e30656fd52be153b7c3f25c544f1e7,fe7fbfdbff7fdbf73baf6fbfbebfff5ebfffd9f7ffbe79bfbdfdfefcffbff7aa,542c85c8edf70f4e783a11b16d2a4b698af6826d69e0d4d2dd32da9ab014fc29,7c70c3b9863a9d261083e5cf305b24827bba168c8d2d291c53c701b9d408579a |
|
||||
0400003980c20144805dc10c200d111425800101000200820103010b8004ca15,fef39fff7ff6addadfddfeffffbfbfff7fbefefcffdb7fe7ebbcf1bef7cb2f7d,4fe7edffffefff7fdffbfbffbfffbfd7afe7dfaffe3fcdfffd7a7be7fefefffd,412773de5fad4415a26dd9dc8c5d66790dd3c683ea6f916acffdea82bcd37e37,36bd30333822885aba3b7ff3ceef34f5c0970e80c03148308b4f492309def316 |
|
||||
0000000000000000420008000000000400000000000000000000000000000000,94111285086101300802d140610241222205200022899710100200a804319404,ff67007c199c20fcbc2ad2a1862e2d9061985238f0aa49599fb59a8d8c3e792d,09924a00375c7de2b40383df641c51cb237cc6a69a0860268cd28e2707dfb98d,3d98f9dbbd15bc671f208839c26bce49a1d16911b2d3859ca826010883dc0d96 |
|
||||
9fe57fdffef2febffbecff8fcfbc14efbfedbeffc77fffe777db3f3ffff73fff,07400400640302002000bc0030000c08390328040425c28822c138dc21856a10,8044894a1c8d970011ad0449c9706929159a7a251502ddccd90368c4e008e535,278a5a58ff6222e4ccec7ea91c8854063d16c17b22884aa8dcd3762d481bc8d8,6bd5a89baa140d962c02578d2b28b9ea92a34910d741a93cc3e8c14e1e5465e0 |
|
||||
8158108a20000800a84230290e08404200400000890840625550014011801000,a6950f260d0f72a6fee9e833583ecad2272a2947f6eef6d510db09abd539c235,dae33fff7e9afffbffdfaf57ddfce7dfedfdfff8ffeffff7dfbdff3fd8be37ff,1a1a8bcd1e7fa3a5e5cc65e0eaf6a10243f5375a1faa89415eb051279907d89d,2c8867e79959e2abdde15e89473bc49fa3258d1d62f9c009f93588fea1dc0668 |
|
||||
fffffbfbfffbbffffbffffffbffff7dffffffffffffefffffffffffffff5ffff,cf65f223e954d70068bf51f948f865cc6571dfadf690967db52f18f38e6c26af,f75e4f65ff7f7f6ffdf4df77f8beffbbff7b67fdfb7bfffe5bf9edfb7b7efad4,d63186efbea1cbd18e5177018cf8f954a9f98e4a120cb7cd6d110f22e123b63a,42b148e278ab5c2159eb0c8b96ee4b562000e38ddbb1562bb5038c1e491e100c |
|
||||
755656f6c81a40dc76915d89967a813da4c9c46446a90af1022cdf5732ff1708,abff3dfffffdefbffeb57d9b6ffefd9efeffbffff7d37fdefef7f4fbf7f9fffa,66d8927731358c43c7d215ec8294942595b7b0da341b055c8dac914761309c05,0e98af3fafd1a23a8448e9eca2fc09760047378e69fbf68d370f8b3194aca61e,5aa4539d49205c430f9f16156fcb851bb1105de68ec44aae99fe1548d45fc2e3 |
|
||||
0040000000000000000408000001000000010002000000040020208000000000,fd34fbfbffff3fdefefedeff7fbfdfbb3f7ad5defbff7f7cfbeb7fff6edfffdf,58ddd8242e8de78d4009b2a63d9bccfdbcfbe728e382780e2ef5d2584ee2dd8b,506f93da1a9383cb2a2c328c40fb2fc86a656b715057442a350331c56101113c,672ba0f6d62e4743cd89197e8663e13488547ae5628c5a83423a87bb94beb82e |
|
||||
a504ad91e8346201f4151111d8888c22ae62e1ab9016f41b8e52e651b6b363c9,df5bb67fffecff9f6fef7e7dee9def775dffbffd2ffd53fbf77efebbcef9eb97,ef5e965dffbf7af6fff46dbffc7dfffef4dfffffdff1dffefdeefffb87ff9f5f,f684d6f4be0430086a46ffab4917ce450f74f795ce2ca9ff1ab1f0719ccac34a,5bdc069a1cddcf1a8e077e3e1c4400fa40ab7a7cd3de09c079f1e2ae09f6a81c |
|
||||
6175fe3b882a07388e2af94eb1ff1035a61e5ec28e4abb663571dcbaea6ac740,0000006000000001000400000000000080008000000000020000000001000000,f7ffffffffffffffbffffffbfffffffffbfffffffffefffffffffffffffddfff,93fac632ec2797a9235e1782f047ff5add23510c892a492ee78cf19f989ac3c0,03b9dbc188e248ec485c79f525f9cb3a17dd4bf556b4d58d37ecd4d9cfb2f6fa |
|
||||
7d5ddfbffefbeaffefeb5cf7df6ee78fdfffcf9de2aefff7bf6ffffbc4ffeb5f,02200090a60000009d10424431020204084080580404214001c01410c0540021,10802890095280200800004040c0048020280500281482270004216108602806,5205e626f280b317a0f09716793fdaf18bca18cf37f0f73764d89f77e4418dcb,069f86a1d5bf0c6a49e6a9e10fedcf4b765d28b6862362c3d39ae62e435eb84a |
|
||||
f7ab47b68a4f8988da1b141b726ab36bc584a36a08b98e9ec1bf6416e9c7c12a,a040d37d95e81c90299da29b69e1eb308cedfa54b21a33ab0b6046743fb436d3,844100c538044811010a02802022051900410010442a08000040aa0182480480,88fb4fb0b3ed67b7bbb73cb44e1566e5d14ed6c8fbccf57a056697a37d791558,0d880777b6883774c26c5b002aea34c26a88467cef741cc5b0ee0922cfe7c45e |
|
||||
bcac8ee03dcd6ab79a9f149c8697e32ec6171e41d850a0c11516b714dc391fe9,bbf7fdfff79fffbfbbdfed3effdffbffbf5fffffff3bbff7fec5a77fd77f7fff,a75466de52972bf35a6a30288016bfd121d4496f0aedac17fa70c3567aa9adda,b18752a7e75f7b18573a5a8c058b1f5e8335c1c974711d5fc65299bb69577b40,1e6c27fc63379121e55326e47c6bdf93511cca7aee9b86f6a4f408a866587777 |
|
||||
6dd1534b3796067d33321b324d9b218215f9006f7bbc80051070efd156200dd4,02332500200ec4054008422c080090428308000005040409e000001100c80810,04c8820201400a00240000a00510610000015140804811884405120000885008,4cd3113e1966e383c545a093c7519df0f9e39694327048b9a802e11243ba2263,039e4ba21cfcdbebd7eebb75d89d07c4c3d85dade9ef233abb5371c3f66f69f3 |
|
||||
fffffffffffefaffffffffffffffffffffffff7fffffffffffffffffffffffbf,fffff7dffffbdfffffffffffffffffefffffffffffffffffffffbffffffbfff7,0000100008000000000000020000000000000400000000000000024000006000,d1faf36145d23e3d9d7bb9a99dc38e823fe796c7a88fd6a518ec57fdd1ba41c0,2e5b1767e0e0ea0965a19eca1688b991a146694e298423822ee5ce65c3f6bf7b |
|
||||
601f792926bfde9044216942c42b04ff874c52cc68a809b2822ded6a02ae3ca5,c4c01401431209881825042a0024122041040828000013179440918202224500,97a0404030a028024ac92a01120248010110400280a000812880344288003020,c4bef900c87f3731d63b70fdb5ea0c84560ded23aebe1fd98d92900ec23fa1ab,701c1f99d0d2c189e9cd2b011c16830597aa377345f389b30171d5c65dc202b4 |
|
||||
2000418d0000010890248422008031421c800985088884a201010100002731a1,ff5dfffeeffbfe7b37ffdefbfefafb6a3dd7cdfe9debeff7ff753fffff4ffebe,0000000080400000000000000000001400000000000000000000c00800000800,8ab8e407e93cf686e5ddfa0f171b0869ca37e9a65c5a8a6db120177f3d7279fe,6d74e26d5e5160234564a80f87d4646f76ffef2d481ed20721169345e54c1c81 |
|
||||
d277b630e4927ea39e204a195ad34c7873ed5a9a49140b9f7da3c87e6df83080,17a7cf2c5c4ffe2ad879063105a06983fca57d86a63260414e0643f5b96de8fd,8006ff7ba3ff833731b8c5fbf8477d47eb671a8fbce8399ae356b89dfb8f98a8,6753085e214122ba58edf53b73541d06b62c4f52803afac4fb104ab03cd20245,3199307c33cbdb385c3adf2c6349002bd72537dc358a0acdde0b66fe51490d52 |
|
||||
94402020081710c001c2001906040246a098020c12104300c001c10090c22002,00cc040138000080226080042080108c52000180024040020101006022090950,ffffffffdffffffffffffffffffffffff7fffbffffffffffffffffefffffffff,8e6f959696d3de788d9dd24e4ad39a002e024746ac611765db5ffe3878011dc6,17e623f5624d4119033d3290d02a11ae53d7b7d43f8bf4cfcc2dd7b23ea46fc9 |
|
||||
fff9dfebedff8f7b7ff73ffffff7fe977affdbdbbffeebafffdfefdb9ffb9bf5,0000000000000000000000000001021201000000000000008000000000000000,304801204903aaa8128a81101080420130285250001440580100200028110a00,b3b28a63b30d17aaaad4c8b256535dc8acb0e1fb32a829872df821c64e27d95a,73a570684646a2f3d6a2266f7d5d9aaaee04682933a38d80f59776cbab3b4ea9 |
|
||||
bd6efdfef2f7dc767f77ff7ff5f7f79fffdeffffbffbffdfd7e7dd83bd3ff9ef,527f0fede5ed4e115bedd5ff10cc89b22f7f417f8852e8af907789695b470ab2,38c5f347e99d3f05b42314466fa38f890b7dca2e17536bbb001d6665fa43322b,90ecfe0689f2efa3e1676baf88a644594bf77a27255aa0d66030e3339a93b88f,4dc2e8120726e07dde0cd1efc48f438a731f6d53d3eefb97c807df636e0d27ec |
|
||||
2c4a4583af78a9227899e632fac6e7252162a16414e7008ffb15cf80ba3d11f8,3d07d72b9b4d3f0a28900118018e40825c036d55a9d44d6641fdc79bb8dde8e4,c05b92f0d90b9731670b8e30eb750022bec7f6f49873ec0d5556fe24f991ac0a,99ec05bb753ec9ab72461a6b9163d422238439b9d18062850bc90fc23c54b565,63748346ea7e02b3665ae51c401b50c00c9670040bd729ffae7c0be1c7fd7a18 |
|
||||
f9ee6fffffffafdf77dfffff9fb7d533ffedffdfff9f7d77dffe7fbd7b73dfbf,0002044110408080a408000180043a012c000812382000904900808108000aa4,0c25b0d9f777c459619093bb5291a5e2edc9a48c07a6adc190dd75254b3a3e2e,a64e9f0719507a8b88e1492666300598bb455a9c32ef9a57c16074d6ffcaeac7,000015b9c3efbb6dd6c4ca2e93a3f2d5d4e1316609916c4427e50e19e47ba168 |
|
||||
1000000000000008000000000000000002000000000000000000001200001000,0000001001010000000000000200000000000000004040000000000000000000,88038000208a00208082810052b100000402322860a110312101300440202304,9b6e8747be39376a46f248e830d007f4fb6f31f10dd62bc61d9a585a358e0a42,0ce31f71afe8c495f1d7cce79fa2772679f81c1e76e3bd1179220643d5d27b8d |
|
||||
60020064000a003002ac860020004c2828c40043a8810300020460220a244600,c7ff9fabf3fefafb3ffffb37f9bff7faffffffffffffdfe7b7ff7eafbdff7b4f,101010308102321120010140100c810080900340400500c00006402820404052,59f94415c3ca83d4e58ad7a7000dc967d790d2034bc2f87db614a555ed61f797,176f104b887a81db00e721cf16abaa69e80c02a3188ccc4ccb9429b8a4664845 |
|
||||
6183084004408000000c001c320140c21108824004104e0010508950d8001010,4d691b4d010c5a0a129577cf0c6dc3d84b61f9dff45c566800fa02bdcd5bad25,806488020041088000a71628000410211508a0a410e811c25003160018004400,d1ea761d7733c279398feb5bef5c4e5c7f43335990fa4562b5a1e35f64c1d0ea,049cae26a16c625cc535608fdf8c33d7b87e633f16e065a2ba6e6bffa17939b2 |
|
||||
ffff7fff7fffffffbfffffffffffbfffffefbfffdffffffdfbfffffffffdfff7,1acddba9c7993cd0208468c2d846d2288318fb8ae61739f04293a3307623d888,f5bfd7aff75f4d7ffa7f7fbf7cfdd9fd7a6fd139d7b3cddfbebdfbf74efefaf3,f231d93c78e2b0441adb70c5cc180e14da7fdf0d906871df7fa334aec32a2d80,745f324a038919324ed40897e8c599d5284f0afe96fe6ea73d89aac3bd3d5c33 |
|
||||
002000008001000002000002000000000001000c000000000000000004000000,5f67bbfedc7effefd9fcabe837e7fcfffffe777f9eff77dcff7fffff18fe7fef,fffd3fff9fff3bdbf7bf5f7ffbff7fbf665f75fb2fdcfffeffe9ff27c7bef2fd,ad4cf7fcd7f5da9cafe82723007ddfb6f786037e902eb091defac3a9a437bc46,1bf59825ac9b056e8ebcd89a2ee4a4575b5f6d5a6634920f4165210c17f02ed6 |
|
||||
034fe0d9afc4af600f40a4d9cb91c7244e95d2c37e16491106c1b0944cd9456f,f6dfffedf3dfbd5ce7f7dbffbfaef67b73efff6770fa9ffbb68ffcd1fbdeec5d,d1134a8033008486410280413900024024520154a01000080014500014204041,b3f7b4fe3c0565cb939064869a6f795b5fb5683ad50c9031c2a162533e64b6e7,512fa4e4e06f5600382888ced12836ec0a905e2651321dda7e7e6c5db37503d5 |
|
||||
b80402880000412b00d001028031802180c00017c000a01100a05405000311c0,0a01041115020000486440020802005000101710800206028280488016494022,c038200140280a200ae00024000010800214040006002049104040a1b2900132,1baaef8903eaa118102f9ad81f765f366909d5726d077d2590a62c741b30cc13,030a1b7b7136492c5995e5393112a2e3a487ed1825a06d98af296e38630a8c90 |
|
||||
9bd912564987f650e31b39f1e59280ab4ff45a71fc8c1cb0352678cf9837b1f1,bceb33dbb66408f874110eba2f1a8ca277cd0d75287ccc03274a2c7ba4e35c6d,6a80ea917780ffe5d8c17e3ff25dbe7a28e8b112f344d01368f05a86559b707e,ce6485e5074f309351390c6efeb7882d9cac8da10827d6ad21be59116fd551a4,089249c351e834cccb3345a68990576d6e23e7ccd475bbf8bcf3809d8d3a8859 |
|
||||
0c0280220020102040014102092938c40004000502018100001468c400100028,f5feacfdfbdfbbfd7afffbfeeaf77edefdfab5fcee5dfeff7d3fbbfb7fff6373,2032089c002d24500ec2c85002924102a01020c9c8121012001068140128400c,79cab046af353b54ed5f6ccb816018b16bafa5011e33a5af95e2f5074dc40c40,13401f307b4a82c5c7de656f495111d1f9b22e3c66d962ce33f002d41e7910b3 |
|
||||
eec71aceb8ccab885b579c7996b29ab71b730377487c809d76df99ceb718edda,20480042016144e0a90560001040020000e20d2200402800040841029070430b,0011084400a84000522681d80442208800005011e1000082820825911204e804,603de5262c4d70c1f6d92ff3ce2bd6e11a12d4f81e46acfed4a97545aa973f1b,0e7342dc85312f6dc152085138aa5a410480098de0a4a1110fd2587a6256b044 |
|
||||
f3ff7dd77fefffe7ff74ee6bffdeb6dfda79fdfffbf7fb3f7fff5fff7f7b7ff8,ce7372b3790031f2758f1102dd2967d5e48fba7ef79cee8797528f27c33063bf,a4f5553555910a1f4212bfd18615d8c20e4558151c0873c05c68f64a6808b0ec,90fdf555fd986fd2038d23d79adacf331261d1ddecbb73aff3ee9dbcff193987,3e10ddd1632cc8d7511ec87ee04d588c57f9d1541995a4305ba09e8d6ebf89af |
|
||||
e66820e0cb68c336dd51dd7d412c6990fdd29230ae59d89a99b97d192b14bc89,bf5f55effbecdff26f9bbfbfffff1cfffffffdffeff7e5ffcebffa8b79517faf,e68404846b145000408c014003100100819412200e8002e025000000c4140080,7255ae91a5227bfb2dce25852612e24666c7573d6e609a7c86178630cfdaf38c,505e71b12b5a271deb3e034524d0ed8790b51dca0de2e109709abc06314decce |
|
||||
a3f2e2a4fb346b977aacca18bba87826a188ad5fdf1ea06ac067ead5a63ccee3,e50fb92bcb04103e6f9d97ec1f797c58e676f6879b42bb4e0738f493efdec692,e64e645bb969fff3651eab7fd2042af846eda70f98c6913348a650cecc96604d,ccbde4d2b00be8a2e6572a9ec89629a3119ae3e592d861e763ca541285d48f61,63fe2ac847d51de6da8f3de7f2e04ba60c0fb649c0df7c67e8b23b8999f914ac |
|
||||
002200040091f004409c1100202690300040401400081010005090020d408017,34847f6ed58df4ee3abea372b445ad8447365daaadc8e11edabf548a73beabb7,24a9909c00008005c20069c00019000b00004004400010049300000208002280,f6afdddb44757857b97114d8730d8b242bae22b9620e802da4e38577b24bfae4,29f3c29a4e7129d611f535f1c44f2e0a0d5e11cf162faadf4a205efa69128e1e |
|
||||
f9bdd88fb92d216d801f5f201bd563fb661f04f087d0f778dd5951ef6bc4ff04,901101150b171012a004814008721413040082008100085e02c49120904a40b0,812010014004600100e589289020022890302d58001a212000044022c801861a,bf910dd8e0d39075a5423c0a7c5c119490fb7d080b818ad1831eef736c5cb4c8,50d853e50e0698a8f9ecb91d2d8b1bfe79ec16e2072b8ba58e11cfd855278bca |
|
||||
2809184201a702080000501010808c0000005002221c106085a4e1aac5022068,4e57829891eca027bf1b90b9eed03bfb8a628573fe110e7f3491d0129f516b07,bcfffb7f14efdf6bfffff737dfeff6fef3fd5fdfffebfff7feff3b97e5bf7f3b,b6206ebecf53971107b12e97deb50c2a16aec7e79be3477998e658543de7f9ac,001b8cddacbe49ab98e838e64dea54340b686351211dd45715f2a56ee8e71d85 |
|
||||
bcbfffafac3fc2ffbfbe5ffcf7ff7d6ff9fbfafbef3f75ff7ebeef35fffffeff,601841068078070d0040094080801c000100089090c2005810088000a0880000,7731f9ce1b1f1d042e4093d3b98c10fb8142e76e93aa329d30f48fe441d5a2e5,0ecab22274dab41a6ff9437257d45bd339e400c820224c0cea3c148f6a22d332,13024b7a37c825c07ecdde92dbb7984f7bcc34d3c2bc41b2ba4070b94bebe6b1 |
|
||||
fbcff7feeb7fbcefbfcf5fe9feb6faf97fdff7d9ff7e3bd5effb7dd7ffef7cdf,a1822c7d328651f4156ced92ff5076fc4819f10b3887828348ae062c8aab6245,4bd18802c55b4d1aeb1ca4364c62282d61d45ec1297fb1f316d1bd4f87be3715,40613a449d04b822e1b2682597163a09ed7eb1c25f2c68219e0bde7d7c3d4234,116d606c3f63b120c26e3f31d51ebba2dfa72e7800bb612ce2ddcaca6ada4938 |
|
||||
de0872a7522d08aa1b01d5c046b74463ae69cf0afd2e92a91401aaee37c78029,dc1caa863be64cce40069787379b02efcee84c0643e953c9b23474c7b1e7d466,ffffffdffffffeffffffffffffdfffffffffffffffffffffffffffffffffffff,9cfc895bcab7774bbb5dec80b273ef60327468edf40b4d95760e8dc515d2d4a6,7f1bb7eff9669b0e994811c0bd7196135c4bf0b2e09e95cc39fed071a5241734 |
|
||||
d84bcaedbe9d97fa80b7095781398780fba1b269bc89dc500a0dc8c7bb48cc22,100012f051d04014624c80430e101000882000202010440000880404150010a6,0000000000000000000000000080120040400000000000000001080000000000,5e0563db9176a9879f20182b2f4d868b3862d731104cf7b5920ae51c9a3a9980,1e362110b53b6617b11f111712958b6c7f1f2f500dc1112ce95c7e69cf089679 |
|
||||
8d97270b1f9d7f0df4cecc0fff292377aecbc1ebaa796b6d75dc247e3bb35c50,340b0204101008512a088810c08001c80400052804c604c4120909204192a002,feffffffe7e76ffbf7a5ffeecfff5f7dbedfdfbfe776ffbffffffdfdf77dfdfa,10fee66929e859918152ae95f231a4868f4b35034b197324cc747eb72ea338e9,4ed4adcefcf9a150832cd05b54923f4bd773192c5cd5f7669c746276870222dc |
|
||||
fdefcbc6d3e2deb7fbf8b3ffdfddf6d7f97bf4f2fefefeff3edcf5fbef7fbeff,effefff94ff97becfeebfdf5ffaafefefffd9f8ccd4ffdfdf1faeffb779dfd6b,fbdf6f7bffe7dbfefc9e717bedbeddeff7fd5f37d4fd7dcfbeffff9ffefeefff,8f6b3d3ac8ef6624b53b1d3dd9c07d1db94b0f48c7c434c0754b02ddef1cc6c4,6d4198e37ff7b5f3f89ededcf5d77198ca21a51d08c055361fa0b75a77d7cd4f |
|
||||
bfeeffffdef7ce66f8f77bbbbffdfffffcefe9dafffe7dfefffef1fb6bd775f7,eefffb3fd1fffabffffffbf6fdfd6fffbfaffffff529fdbefffbb5f9efadeafb,675c7bfeed3ccff2ffad6fffff7fefdffb7ef1bff97f77fbffdf7f3d7fbb4db5,dac4fc511c7050d73950ce3b3aff95c0f695653fd348ddd599abce519db71291,161b668fc52ee13e0460d830f2b1451699d7fce4fcfdf8fd029ab7973d6bce36 |
|
||||
ffffffffdfff7fffff7ffffffffffeffbffffffffeffff7ffffffcffffffffff,7bfa7d6afffe9fbdffbfff5bcfffeb1ff9fd8f6febffc6f7edbdee5a5dfff9bf,3104a0040000004d24201158202b0841042268208674214e8683828020449844,d3204513b1c46eb4e45dca12a52b62a99683131007b73a4a9b1c240ab83661e8,3a386544740ba0e7935d690e27a51d82efc7fe230cfcf57ffbc567ce39253ab4 |
|
||||
bfffd7d7df4fffffffe99fef7bff9b7f6f6fffeefbbf3557daef2febf1bfffff,002006046402c02000880b10a40840080045400b924241090400706885000208,0403600c00014060800808254080001004034100050888202044024c80000810,da7e6c26fcee30dd60a0bdfc5653b56b56b1fe177cf6f8d58596b3f580e8ce5b,77ba06622463b61b400e96d86537ae785dc84a32b03af28cf05cd0c95c40be99 |
|
||||
e7965bbf15394036d427f43e826b8555e8889f21e49b820a004ae271c811ed83,fbfffdfba97eddefceeffdefdbfffbf67f7defffbff7fefbfbb65ffab7ff5ebe,002bfe275a4ad4f7c65241bd64fe8f73160fa672340b7f8849ba98575f2e7db4,83aa4f33f190e791004e0376a51ba9bec19d55b36833f133f64560b5a23fcaf4,5a481c4ba2141bea005ea35ed0536e25c473328d02a056a66ffa8aed83256f8c |
|
||||
f7f9bffb6dd9bedbbbfff573f6ed9fdddffffbb7b7fdbffe7df7ff7fded7ff75,c7c81d083cb2cc66e58c1eb63eefe01fd5e26e13b6402bcca61a4594b8a6e933,0053800c00c862000604001084002109000212a0460900465240442108a10814,332a3af0bb95f17e6c8309b023881977498498615a034ca058df4069655e7f10,4e922facde6a1fea107c4c9b8c472a1bc1bd004b07c74c8ba2926423403469d3 |
|
||||
500288831241210268c040000800100802a520180d2120a5a10d008a61020510,345149fd94942a5c53cfd98d96b979002b667d3f63a1c6f979861dba0a39572b,df53c9ffbf5eb7f7577fc9c4e7df7b8ffff7dfffa77dbdb5f2efa5bfbf7febdf,90d202225bd1bbdea8568e8736069ebb24e02624c693994a08e4c7e5a6bd955c,5037550a4d592101550afe0028c9be2780ec97e02dfe76a0d1d7c307d41f7c79 |
|
||||
f7affbbf758cffb7deeeffeffe1f7f6fcf7beef5777fffdb5ffdfddbfaf3fbbb,00180c00402000400a0000c0108001600012104910149050041002021000804a,fbb7cdf90cd54807cdab49f3a6ba9eb7ca733e4ec1f0ad839617c89231b4113c,289c1e4aa4edba10853a0217eb6e5403599d42dbedf23d6fd9a3aa148c6c2fa6,3990eb51c068bdfb9e2bdb7d7f18d909a368791a19d1a3868974a45233e222d6 |
|
||||
34ad4aa44c8d2e66e75f943c9183eb77f32ff787c6f5de8513dbd0a98ba9e226,0000400000000002000200000000000000000000000008000000000080000000,7dcff7fff0fbfeef8edf9fbc7fd7efbca7f7ffdfedceb3d8fffbf7bdfffff9ff,5d8a7426697f2b06fda5600df922f0c3a445db85a4c60c4dcdc98182c404dc1f,3ed3b08a7c5c11b7ac86e55b448ff3cfee46e5c65d4119769c80a9d6021b018a |
|
||||
fff9ffebfbdcfefffb9f36fbedb6fcffd375fdafbcdf7f2bf7edbdffbffdffe9,c41229ef4559a25e37e404201b67e7402a5ccf3581c30bceb1df95dee5b03561,0c08020151400a00100411036008016000800040181005074001000600104000,37ae61dc3c36cfc83bc849cf773b10e44bde1a060b24f6e3580bfad58cb1df1d,0926d0073bb417f1bef8fac1d84ade38884b0606b403d6ed876d32189b521cfb |
|
||||
3fbefdfb95f7c7fff3eef9ebdf7ffdb6e7bb7bc8fefffdded977ef4f57d3ff6e,dffff7ff766f7f77fffffddcbfffffb7dffefe3f6bddfbe5effffff7effb9ff9,ffefdbfdfdfe1bfe6ffbfefbdedfb195fdbfdbcec7d7ffefd71e7dd749bfdef7,a64d37cad643855926ec937bb49fb3cffa9cd2c2c4097c01eb3f62dc4976cfe9,0618cc973706f9722128e4b80eb9bbcf6be714595cb56ee338a03947938e40eb |
|
||||
fbfffffff7fffffffffffefffffffeef7fdfffffffffffffffffffffffffffff,006982b0022100800218410500142668c00094000010412261c01800c848140a,66d00192503933e68db9306d09b994da3d0e68ba3bbf90311968845adba9a4c4,6fff5e59f2554e46ed97a60f0ac22883dea04852de0108e7cde112246bbef68d,521e69efa1de7d70f428208634e3c9160d29ac9a04c831f263bf669a6a02e633 |
|
||||
cffff77ffbbdebefe7d5ffcba77fbfe7e5dedf6fddffef3f3dfbbfbeffefe7ff,f7fd7fdf3ff8dfbaffebfffb7dbf7e0ff9fff53fadfffebfbffffbf5edff7bf9,832ad2636f3b818a4c0b97e2333a04db26b3873698d0e4fd8a001464cf36f400,43d9d14cfcd48411f494a105fa2d703bee3cd0622c21ba0edaec1b32791e0399,44db5abfc108d0edff514536f7d495c6f0cba335d52b6622e32dcb0beda95870 |
|
||||
ffffffffffffdffffffe7ffffffefdffffff7fffffffffffffefffffffffffff,77bffaffa7fbfb7feffbfcfff27ffefdf27ff7fefffef7bdfd3fcf6fd5affe7f,8946fb79edb11d2d41ce4ea35d0cbbe451482e99c7062f952bf79dac9f68fa9d,6e8fdb66f5b77669c91fb15503c54122ac07f7e4bf891ca3bb5f049f324244ef,3f0a9f82324aafcabdc1fc0be965d6cad4642290f0cefe666e4d26ea966f8a6d |
|
||||
ddcf9c52abf25005d74ad34a9740079c39a9ffb470b21ca591e8e8febf32a66f,ffffefffff7ffffffffffffffffffffeffffffff7fffffffff77fffffff6ffff,d7f57f2cb7fafda7dffb9ebffdefb5fff766fc7bf7f7ddfeda6ffffffaf7f4db,5ebdc082822e27718da19e53e13cfd72d98d13558d5de34867403161d89e6f62,78056fd5fc1879f95f234dca7fd1e46393df361505f6764bb5a55362f905c068 |
|
||||
ffe77fff7bffef7e5ef7fedf4ffdfefaf35f9eb7dbf7fdff9fbfcedf6ffde7eb,ebbfff4fbdfffbf6f5f7fff367f7fe8f79fffdffdfbb57ff3fbbbffbfadfffff,010004000080200200090020d94202800044cc80940001004411010402006000,06a0766ac9e80d3d7d878edbb0e537596a36fc727b6944c9b80d62d787638ce3,4a9c10d59e0ad28ba68de76dc79e3410ac3c95a53fde6b14228419bced5677fe |
|
||||
ceef6eb6ffaffff7f6bb7ffefe7fe7e7fdfe57ab7feeb2fd63ffb97efe7f7bef,0041400038c8864061205000281902b306008bc21000620040008001009800e0,299cc2b5d4fd26489b962ec557df18062e4c47f34f7cd1804ea6c509c6135523,2d9c45b1a52dde5f7cf61bc276656854108037c30e4b6240f4cff9dabad1064f,02d0daded9ad716ae8616c59090f2516912e339018e83b570063849ad6b862da |
|
||||
f7fbfcacfbbefffe9d977a7fefbfdefdf19bfefbfb7eff77d7ffbf6feff7d7dd,000002000a000002004000000202000000202000020000000000000002000000,8021088104000400000040a4d00729219008104008600801080200c800805800,cb9389590ad2227fc703b2e3094c5e2c3c2f5758520583d958d4551a72272bb4,4a0ec2fa665a3923ef764939b58b8c32b2bea313c375935dcc17c80e4d5e6e13 |
|
||||
5240010880180a48b07003ea2030280404206009200004808124004288810810,081480004024a0208508800000151e2093210400204071020c41228008804508,bbaeeb7feef9eebefbff7f5bdf9ffff2ef7fddfefa397fefefff7ffffffef1f5,d522d9fd3315be40a36be5518d7a9fdf2a652a1739005ff2e245cd36e0a4d3d7,68daf5ca8b0649315857a055e474310719344b6575dbf6fd6e11a56a25bf566e |
|
||||
65e794acb0a8a1e4afa76e8c27000fb31344b6971f7ea5b0e8542ec7c8843821,87d034b2d38e8e0610d9fbabc159be0118ed657b2c6ebbc3e34337761799f796,a9d609c81017e9ca87b918ea363744d6ae715216a06da96ff7797314d9bbd649,4c0ccf88ac3f801d91fc81c9f3428cf458c3ef7ba9dfa4094fcdfca7508407a3,60c2fb38d0ed20c30e105abf376464c8acbe97b64267b221d23791adfa296055 |
|
||||
fafe7f5dfbffa3f9f7f3d3ff567fffffffd3bfbfdffedefee7df7f4bfffef6f7,0000000000000000004000000001000018000000000000000000000000101000,6b44a4acd9af0cdf59191f3cec4ff877321d3f978f109a2d773a22bf3473ea71,757d7ec73409052da8ff33d55351b2dea44a90e45be62d3028c22f75aaef5153,6662b3c54af35cfedabd8d0dffc9a4921952e5380141e0799e62b4f3eb18dd80 |
|
||||
fdffefffdfffeffefffffffffffefffffffffffffbfffffffffbfffffffeffff,a96515541f3ecbf37f565e5da5000244acee4d0c798940d6eeb6a81c270b54ea,ccfd43ffdfffecbffef7fdeb7eedbaeff77f5fdfbdfaf8f6ffdbf7eff5fffff7,631c20e0d2c3b0fe3192b8e39218acb4f37b46c7b5e42a7690e099ee60567d55,00bb54a17c868d93c889a4ba389a8e4b5623ad613d86ed1290b31321d5059581 |
|
||||
fce76b47b74257d8dc62b4aed6a741d661d5b3fa84d1135c2e6332e79685fc62,76753c89ca3102509f2f45806a1f6ad7b555f72fa1683354ef55b2f9f3e7f525,bfff7fafbfd6fddce7edf5fcfd553f55af9a73e6fcf0bff675effbd79ff7b7f7,f1aa5eb430563b923609879b5be80e205658280da4ef8774c5fcace5a674a822,4af7977f984de72b0d1f3c848b5a737d24c8239f8295115361fe793fc6ff6bb2 |
|
||||
004040053c042210040931110080a0408011e8018010240080000c0000022100,fff5fbdedd4db77df7dbd67fffff77ff1f9bffd3fffefeb7f7fcbf7ff6feacee,5dbfcd9debfdeffff7eb17ddbfffddff7a1d3b9dd37a35bd6ffff97ffd1ae4f6,02db9a81c4d31fa17225fc9deccf8ca37d3d256094e561d05443b9bd332b4ab8,1781d98c72339bb185e2fea3219b0830004c0886abc0e6d1d19ee76b548534b5 |
|
||||
020408400085c004004400007060b00a32c00a4a2a80b2048000a91206022108,effcfe7f45bfeddddffe99f7cfff9fd0db7d7f5fddb5ddfdd7ffbdd77bffdfcb,a84224000000c00110245044096000a18400002220104901614801001a086101,6e001a8d6a970e2330e526024b0930de6a9b7b88ef574ddd08a329eed960ec1c,640408b2a36331e48d3733a0cbd4be47e64294e8eb784f0ba0f77b5142b99177 |
|
||||
9907c3da1a25c49cbaf2386d3f02f19722097ac02934777c031e7eebc24c97b5,54b3e023d6f2267bfceb19bc178a52b8c03f96c5e5e6f1423e6df1c805dfcdf0,0046270a01902180104903400030503600004a10bc000110002160462060002c,3930de52da3cdbb1596324f25b2995f124d5744f82473e5db4f8e1ec441a2438,41b3c13c7953cb243a09703c956d29dc217fbe313ed0367497e500e67a44c1db |
|
||||
0000000000100000000000100000000000004080400080008000000000020000,73a7df95198778e898b80dbfcec4289b001ddcfa9b48f8e40414747109fbdfad,96f5bc4b2ba228eaae26524543f145965a773041b6acac6b109c7bb4ff28b4d3,860771007ee5609cbe283025fe6b087bf2ff5c14cf8ec71393a4d3fc42233abc,7da1170746471c8e7ad647d064604565911e4d1458f8fe0b5f8a5e9de141c622 |
|
||||
00920c9a2c5202602831c0400a08101200018a004d1020b800000181e010892c,fffebf6fafdef7b5ddfddbfcfdf7f77dcfffefbe4fcfdf3fffe9fdfbffbffff7,0d47be71bbe3741c14120c9ab063d0e1c52c0210a43a713f4ebcb1f115ab82cd,b82eb62e0903beef7941be598f8bd08621420184642aa3c1e1589012cb6f4434,5d5d2af18f4eaa072bfb2dd2c5e3459edf521c772aa4084ae778fe2a426edfcd |
|
||||
e9340e90d43d7fa0985e4122470f32bfc8099b2ee3afc0ce0ff58dc7a5ac4639,11001a18048000a0000044000000000060400800445008201840182500480000,600e8335044461014000000000064040800f1206812c040120400400457608a6,f4ce98cf0ced2e80519ac833ecc9e6a002da1d52b389038f8d27c6c58a9925a6,6dc598c72a7f722692b9862b2556da632680579e3754f97905e147efbd565132 |
|
||||
41a84af68001b0fbfd6866a474ec833175f9956cf523dcc8ccb1c2844f5b142f,000100088501c2024d100894820204008011a0000a15c3a12a81102220000022,fb7fc7227fdfffefcb5ffee7bfee7de7fa7f77fd76ffcffdfdb7f7fffb6bccbf,0cf8850d1fb39b990267e727b91f6ed0c6138f26cbbf6cabf55f65e7adb7b200,6dac3edc5c29e614302aa1c4ef829ac22cf08ab6ee7d7e27d13752ed7070b7ef |
|
||||
122640285080a4504100a20504104c060120a0401600020c3200110689000280,ffffdffffbdfffff5ffffffffffffdfffffffffffefff7effffffffffffffff6,ffb9f5bfebfbff935bbdfeffff5fe1b8fdf5de6df3edff3fffe6af7ee7fefbff,78d3bf6ef9a29ab494c49b88f0c80711a2b1df29a4347242872fd0a81cd91800,22dd2007ed4f8f9a254a4337d840d58bb2c95573391d36e36c0e20bdfc2efc79 |
|
||||
020880001100122000896100c8810003440122020203301c8900a02002600a6d,8bd8819ce4e6aa18401b90b6c31b6c5d44c2f68b657ccb1e680c6528d4e6aaeb,140001109914180040c40a00001a5c081401380584004002000402048e6021c8,f124846c1bbe88a5962df418c88cf16413fc855088d6c7a8c098902b76dbfef0,6fa939de77a8d00efc594ba8a36ba4c77daec6733af50e51a34acf14b90b0f62 |
|
||||
144174e56901d067c173b208144f6f3c5e7df1697878da329bcee4622e4d87b9,ddfa57fcedfbbf43eb5f30ebfbde7ffffeffd77e7b7e77ffefe5fccfbfdf7f3c,fffffffffffffbf7ffffffffffffbeffffffffffffffffffdfffffffffffffff,ce0d5497b441d1b09d4cab94e1614dd086fdf50a9c88b3844baeb8ba72a17b83,03aedc917a048cdbb159722527f268be91d62bee6401a86631666e1a2064eb87 |
|
||||
1fb11f1cb09ef24942273bc091a8226c37fa92fc22bd3495cac8f5ceb24021e2,012300441431800080811063184502090008855302e000a02028e81408080084,e4dffbdfff1cdfd7deff7fde7ef17cf78fffbef5bfefffebbdfffbbfafa527fd,c7afa0158d7ce075fdc9ddfa292b8ce384e61ecd7cfb8fc50624ac693a36bbeb,63926771af4938945643ea67720e312e01913b75981fcc495069396e1f7b1693 |
|
||||
8ffaffc6f6fafe7dcff7eafdfefbf9bdfdff7fff7f6e67dd7bf7faf3f8d2f979,0000010000000004004000080000000000000000000000000000000000000000,9540044cd0000921402101204080164026444101542c146054c209c02d02822c,5efacc6e1e88c67b03313641d4371d80d85dec8342144dd44bbb5eb2f1dde8ce,057022b8528c217d790dd89695265c35c7c980396035e128e475d91b90864d11 |
|
||||
8fbfff7f7fc19fbff7fefbfef3ffe7fdecbf5f57cdffd27bffcfe77f7dff9375,beff3feefd7f6ffff7fffdfff7fcf4bdcffddebeddfdaedfdfc6fde5effcffd7,6bf6a7fdefbe74e6fffbbeff7f7ccfe5ff597fdfffe2fffe5effbf6cfdbffeff,4035aa62bce8bc6e3f660544ee4c965f7306add8bac408b6bcd5a5adbdd36edd,3390e411d554184a4fe3ef477b96a6a03b539a1b256e5484917e3cb8653c960e |
|
||||
6b046b437f02a07bfdb28c5f90d2330334b46b744f952397cf2533dcd366911e,dfeffdfd7fbbfd6fbbff6ffcdd5cb7fbf777dafeff7fbf7ebffffdf6d6b6cddf,52ee0e548e10c1c8d07413e25264381bbb6f6be3c3965ca0796077a3f52c454d,c578cdfe9f15254fea5689e23ccab0907399e24110c43057d6f2af3b8a2cdca3,446f0ea8fb531d630b29c4981a648185f843d4fbb5969b082ceb2af398ec9d57 |
|
||||
00a66c79f3a1b5901781c2b7e820358a689e1e450a36f26f5cb3e9271034b318,0040320a020480442100923000245820c8d99000004204080100180850b41018,a0844004880044445080082a08000020288806140840020050400210140800a8,dab8dc477617ce6358308414b0d6b8b51cd259308831cb8765ba1cf8b13a6ce8,285cd92c15183225403e82af415a3d041f66cdcc898490a3771e53ad9b2b1993 |
|
||||
ba89eb3408b8547cc94b3302bbee0c642c8f4ef489273d0bee1137b2866be927,fffffeff7fffffffffbffff7ffffffffffffbfffffffffffffffffffffffffff,f34ff7ff7df77ff7fffabcdab1f7f9b9fe7fdffbfffdbb4fffedbf4fffff3bf9,ed05bf224dffeb95581d3eb50b0d5afbb627d3bd14e461706bd5d17bdf2d8bc3,1a82a5d4e030c5c393404ab9284bc0a8ea8063011bef5c523b705fab93276aec |
|
||||
2050888010142001a0a00200014712688020049276013000200000189534a016,bffdfeff7f8fff797bf77ffb99dbfb4fffd3ffbf76ffffde7bfd68cdffffeff3,ffffffffeffffffffffffffffbfeffffffffffffffffffffdffffffffeffffff,9ba15cc108e0ced2708064d04ab1f0c76b04091cad9c0cd1331dcab7cb28383b,7687b3fcdba6e33187fb5bbf3939319419c706db1c65c2b42302e19b4f46bcfd |
|
||||
9dfddd7fd77d7fb6dfefffdf6ffcfe1ff6e9ffdd7fffef7fefef5faf7fade67f,aa5c18044cf57ed948d27859b87a75087353d771d89c89ec3aa8a5e11c78e6ba,02108025a0d00302020470401631dd844a40a21830100a20800021023118181a,4297750f583e63b6010074388ac5bdb64cf0514b0fba57b56cb6af58ddcf4f47,07ffca469d008898cc87c21a2307c84e571a003c6fba90c04d45312a841fa8d1 |
|
||||
4cd7e3542d83175c2b30e9b615feb25bb35e523eba346e819d8ec834f59d31dd,10000a014480c04800134188852034a4a00800014110aa2050800d23080a03c0,02011000023600014404e082103022008002439850020860890100d408c10014,56fdcce5e13b85b8487ba60bb91f112a9b4b5411379cce730cd00b60d5b5c7f7,19c59770c8188952d6f4e7975eaaa23faeeb79a307cb40b946bae40aac1f3128 |
|
||||
42008000040281a0080882040800010a8106098c8c84090000300004000c0832,00041a40207408400201000000100026042c881800120000c411811808ae8403,fafddff0beb5eff9dfdbf7d7fdbffffc7fab7feff7797cdfdfc7fddefebedfff,f76703b5b95ff00a225c6f6c42cc3bb5320856d8810249a4064890d17b315def,699febf334c32da618b59acadfa62f814eb54cfb38d36d7952d5884ef03f323e |
|
||||
0440051020805412212090c800128001901234511080020406044300202e9020,49fb33917fd230f0edd0accad2cfe3d150a4fd8f635687236565b415734b2be6,036012004a21000100001a1800049480140005410e583281083a010d02156200,10106291754d71aa6fcd24efb9a3ce4fd779b4affe4a14eb47f66e7ed0c0570b,7c5a01545f6875c34a127f2cdde5fc939de8926435994cbe10efdd34d857e843 |
|
||||
e9a7326b5eee6d8fcfe0f34580ebbe687dbe1b553e0d35aafb6e99764231e270,f6ffd7ffefb7f7f7f9ea7f7effbff4cafefde8af8fff77d79ffffbe3f7ffa6fe,800000010881000020001000c01000400090419bc80081202c804a408c0a4204,287022128363f911a3f90259e05b17cf8c302dc6bdd56df5a7a60dab889378fe,03347e7ac9e06bf4ce6122249706b38970f1d3ac0df5e8dc2423297bdcd2b75f |
|
||||
303802a21801b000003040004640100302009202180af0200c08090001085a00,d02000241980800001000646b042014000001000a03086300000080201022204,9d6fdf5bf7bbebbdeaff7fb3ffbddfef3af7ffdfffa6fffff6ffdffedea57b9b,cf41451ab9e1f81bd493a39ff4b503fce68c1ffda8dec891fecc9d65537e71d9,27a862bb253fbd6bced21934f333aa0afbe993dc058854b8a88fa66486416f65 |
|
||||
31124030003822110800c8271000410080200cc50c05420802c0a28340108280,7655fef77bbad73beff4bfff7f8ddf7e7dfdeafffffbff1cfefff6ec7ef9f7f7,fdfefdffe8affe77ffffffdfdbbfefdea74ffceff1bbceebbf37fbcff717f6b7,52b71297b8b01afc408bd13b92b78e75f06ea4e5b2a3134fb8b292ffaec36ede,54387d0a78f08ff9c8e9c8bd513e1f3a6a77099e3ca6b9b5a2b11249ff6905bf |
|
||||
01100000000000020000000008000040008800028000000080c0800000001100,103c0840484000c201b00c622800800120425810201010409119030b26c4214b,c7e1347dcfc8f070abf547f2640b18553bb4a37106fbf88c9f2a3d6496ad2027,b40913514174b63857d980d9251dd0b62e8546f41e729c82c75d4efa4e25ef13,715a6070541313a88af4c179c8404ba0ce19b44556ac3d5079aefbc27a414a9d |
|
||||
60881e200000089040d90409128866500880c4b05020e0852c0c640150000110,3ceafff9deedffbeffffeefe73fffdfdffeffff7df9ffff76ffafffdeff1cff6,ff7777fcdffdd9f7efff77ffbfffede66beffffcefbefeedf62a8bdf7e77ffef,2cf2ef4c1d31728bf116694c731763a2cf6957d600572626794ac787ec8a89bd,471e3075b9b5f259c3654688bc7c765c4c51f5b1f5f97f27f09f52b93ec70dae |
|
||||
fd3ffeff7feeffdef7bfbeb7b57fbcffdbf7fda9ccfff57dfff95ffbed7f9677,50b1cb493ef9728b75e80c74520e5c0a34a1b8a4d1d2ad37f75eda09850cbaf5,ffffffffffffffffffffffffeff7ffffffff7ffffffffdfffffffffffff7ffff,c08836c608fce7344728be5fe349f47bbe5b658be57b6ed03843f344804cd772,7ce52e4727c1cd67d4be37ee779ed6e2fb4fc24e0618e3bb2c20251ae745517f |
|
||||
0000000000000040000400000004000000000000000400000080000000000800,7cdf6afff9fe777b8f7ff77bbefffc9bdfddf7bbebb6fd6ffdffefbffd7935d2,9120000040080920080480090125040000400000011002018981020040050101,b065ce5042ccf25bd4d74eed4672f67b8c0504f2835744aecb17558863f5a080,43aeb1e53da356265425e3d00196b4af11d5cfad52504cef02b84b7780f2e760 |
|
||||
475df7aefefa6f6eeffd7ffde7fbbffffdff5fd9ffff7adf65ffed7ff7f73679,202a40020122c10480244618c180002128300242016804410088400660002902,de5ffafddfbf5557fedf7fbfdbfbfd3ffddcefbdcf7f678eabddffbfc5bffdb5,1658fb713e72698813e790c5f2afaa3dd8f5abd3c546ba9bb3cef8d931de0faa,0cb69723bb8364fc28ab848d0dfbf8436aa1cc5544eec4e621afa79601ad5d0c |
|
||||
000020008020000000001000000100100080004000000000000022040000000a,767ff6effedf7f79f7fd62fff3377d3ff7fffd96fbfffbffbfdffbddf3efdf23,ff733ddf5df7f87eefdfe7dfebdecbedf6fee7ff7ff7fff7efdfbfe1dfbfed7f,d940ad3e80848da359058fab95524d7f19e3f404d9bb0dab4a3ec281fca9b8f5,7f7f4152f76799c34822a9e05deb0cb1dacdf427030a732fcead4a4c39e4ee6d |
|
||||
ff5fffdfff9feff2fb7ef6f7f3dbfa7efbfddffd9ffb1eabffff3ffffbf7f7ff,7315b60965288e29a481cc3bbb6e13491e296b74ce6c1813653733a30e6f79f1,754eba88e3a6c21eea5272ddc1f7ccd9ae4ea0669126e48d29aba2aa44dae574,80b9927aa5ef03125e969769206541e32c16d411a02bafd209f84e4ac2ab5ce5,7ab687245c2920b1922bcf3718d7a3ef4e29c6ba2205196360268169704a2298 |
|
||||
25698b036627974a1db6322f6ae1b460c9aa4d3fcf77662fae5ee0f54c89ca25,fefdffffbfbddfffde3dedf5f1ffe7bf77effffdf767f4bf77ffd7ff8ff7f7f7,efaffdffdfdbfdcbfbeefdf77f9ef7eef5eb5fbfbddfbafdfbffbffffffb7f7b,42293c0c408d64b88eb8825e24d6a3c937a926eaa527c2338f145f19e50a57b4,0a876f771cdfb026b845c6e34188ff17c3cef01e1ec9a1ec2b2a391af8115d6c |
|
||||
d86ce9a33da3e3ce23619a5996b102c5b7aa8cce303b57445365b31e8a60624d,0228608981084b4201100124084049e6060a0821440000000744104805920280,0008059552002010411010a84100840000303a444400089b4000002000c88400,bd003be98a87d048300e3594fb132db5a6bbb61d51e75f7938bf8e6f35403d29,59f5ac09f2805973506f705df75a081e43d661f1ad806c0dbf25a30ce6052c8d |
|
||||
0c10404094280d160281644218c1081002080414940214a00008040704280010,0048110082102508000041a88003128804802040c01470001214211001000021,fffffffffeff7fdbfffe7fbfdffdffff7ffffffffffffeffffffffffffffffff,325713545db3be791c51d9d327e2970db5dace2d93774aa251827389468b3690,30f103bca4bca954c80d0eea52f9503009475ac755128e3bf1758a083471436a |
|
||||
008c020011800262c00e380169101640000b00218430001e020e301610080200,080e8102000022080a00000c040046000002120120400088404040201c9d1286,a7c50bc19d928b3188ec316e5df83bf92d9cb71ef1288e466b8653150d688452,a76f2b0f08f7d3bd5fc5b288e7d614b39a26f429e6011ddf309fb7d8d6d817e5,293f9323a9673e33bf48b797391d83d4d52df46d097bd38fbfb3a48f7dc09a56 |
|
||||
4011002a11500204002000012114408400000020118001060231008044004930,0104000000005000200020000001028000000000000000000000900000000008,ef07f3f6dc77d0f6fdffbddfffbfe5fedff77fbaeffcf5feb9bfff7c4de7fe7e,79fefcbb39fe503fc1af74d6e8e4087996dd41faf1bc18a94741a202d8deb98e,4671eb4baaf7d1558d4e309b23cc4a964936bb09659f1b770b3b941047105943 |
|
||||
ea7fdaafb767bbfaf6e67fffff7eafffff1afb7f5effbfd6d7ceab77dfb76ff7,7348f7e786e42a4335b528277587d1ea21892be046bc22f29f6fd4f36f335f3a,11e138e83ec92c1d516622e87a133629314f489cc538314621da431f384b18f3,49f040c873fec6ab299d8cc6e88ff231dd415cf03f99c68a4dedbc32eff0f413,7b460d42b694768fdac24a08cd8252ff7304d25c4d17a287b81fd1708c771002 |
|
||||
efffffffffffbffffffffffffbfffbf7fffffeffffffffffffffffffffffffff,000806048231341080825000190021020021011100408080218828506a40e016,f6390695d67e602d82913d7158205fcc6daa24130548710fe0725a8edafbd2d7,f735d41dc4db7152d13b6556d04251866b2e47b4fe41fa5e8e2f4d6d20bc0560,1df38bdf8ca539f62f13d78a44b42f8f4d52728053ceedd2c768c864cd2d2d48 |
|
||||
9ad7dd2036fd52ad13a7cdaae1bc2025dcbb1e9701b12c888e9ee8aa9b9b81fc,ffdee7fe77dc3de63fdf7fcbbf7bff7f7f3ddffb6b7bf73ffffed3ffefdef7fe,08114e7a4885126b6eea74e6e31eb51f7aaebaab3b5c3e225517c73968599fd5,a9fa33d598c574d155dd8bc128a906e7acedd9b4b3e50018d9d107095cef4aaf,41b19df8ea173714d0a088c5a194ad34f8f7d57758ab878ede2ddd59cf219d0a |
|
||||
eabf9ff7cffeff7fdff6ddedeed9bfe2fef6e7dfffded3bef77ffbfffebfffcf,c6b110a52ccd72c28369841d693eab8c98e55ed5a11fbfd0857a0b62019866f5,00000a1008000000000200008002000000000000004000000000000000100004,eb0e8bf77d7886aa67c5ec55d8f29030f8c6293a45322f87897b5bc7c3dfcc33,6355d349bc149ee568206475a2b727fa1ee6ffe19974222ed5ee61390996bf44 |
|
||||
92011180002100d18440010240442202044000034740524204280089880a8110,200000c008a200d1440201221005a0010938042200e820400000002c2a008260,f7f7bb7ff76ddfc3fffbf9fbe67ef7ffbf475dec5fbf7df4be75ffff7eebff7f,442a67e914d88d8f28ad895f1fac61769a3febe38cefa28675f76afcc5325941,377be267cbb4f6773cf34e60984afd1539843a9d779f4f5cc7c207b70407bbf8 |
|
||||
ffdff5fff5ffd6f63ffbff6bd7dbde7fdf3f1defeefffbddffedffffe9fdf7f7,24380610000330015401242588403104441208604380108000a200061bb40c00,f7577f6dd1b603cd715edc24ecc2ac227be93f84a3d06e975508a7023d82517f,db96618a4c464d87c055f0072d5df2a5c67c05799f5408cebe8b45dd83963340,1d56f2adbde6fc7f715df16bf2ffd998d4158f33eba58bb04bb379d95e3f41bf |
|
||||
0000000000000000040080000000000000002000000000200040020000000000,8a000cc40c28161040210000e904140604420802093d80080056106385040040,010002400001a112008210200700302524003023200100080400040000008010,daa66d015d75947374ae922199d20e8b14e1fc25f42ea1b49338e1b2c5896435,2dcf91dd61f54a4570aedc2fbceb7eff2a229f8c2cc6b4f44898c0cd520954b3 |
|
||||
b07ff7e7deffef5dbfafef77eaffdf9fdfeddd7dfd7fab37fe5ffaaffdddbefd,bf7ffbcefffbfff6f70efeee7ebffddbdffffd74effff3bbff6fd777e7beb3fb,020002040800309008548500000400000c00b089080800032241001200a13122,3f2802473138d6e36c3002799e77c65e3d9a77b9bba00f42ec2cbe421b3aed73,623f18b185059e483aaf3933effe9ffb3e8083ea757edffdfe0b9f2704006f37 |
|
||||
3000604800002838800800002a0072083004044150080a3382200506010826ac,79ddfeffb49fffdfcdfe9f6eeff1d6b7ff8fbbffffffb3ffdf7edffceffc5db6,0e41df624dcb4fc27d7a254a776c695fc9dbea8048699c1ffaffd52d1c67869c,d0aea70dc048f877eb0a2c52d315e670902624c00ed27c167e72b321cf0fc2c5,7079888bc59e9f3a78d75d97b3c1e183f99353506a918892b07a53f87be24b05 |
|
||||
ebfffdfdfedfdff3ffe5e5ffffffffe39fdb7bdf5cbaf5f57de1fc76f3fefbff,7d77f77fb7fcc17fe7fe7fff7ffdfda5fefffe7f7affbe33ffafecdfd9fff7ff,fadfffddffadbdbfffd77dedbffe7fdffbf9eee4d7fffbdefebfffef5acfbfdf,ca82a85208410f5226ac7e17f6c8fb600387307e2f76167dfad9fe9badb51bd8,0cbbc66409ce9992682f223cafd23474455421fa1863ccdae043eadf150fed51 |
|
||||
01ce000420184901000002204a000001012c004c49844880a0043000024604c0,2dd60e2e589ee6ec9c00e7c94ea4206a5321a80bd2fa3f1d9f25703d823b34f5,af36ccdba450f81e54aff3b11f491a311c8ac8f5eea6d68e8f481109b11a7ec9,6dc49ea09fec1bc7956be72684b7bbfd3ea682c6b4746e4aaef1f7f5c55403c8,13cdfbe80a003ee0382bda1041520f78d7d1b21f324c793647c955a5e3b1e6ce |
|
||||
2858040048009080110481000210208506420308223042004000600010006800,04042d040c301002182c00213aa008111018400800a420506400420220020010,0000001000010000000080000000000010000120008000401000100000000080,028f66e9f0e99410e41402776e7cfd331fdfc8b8d1e256005f1b253645435c1e,06bb28100f95fad41b90d2dedcc661e4a996e56bf0693a90b32c289918f852e0 |
|
||||
fb5d1675dabd8c03b1a46f1b63dcc279730af4c6dc2ec86d7dda92b30c994937,fffffffffffffffffffffbffeffffffeffffffffffffffdffeffffffffdfffff,d3ff5ffcfddd7ee6d6fbfe9e7dbf9df9f9fffcb7fdfbfeffdfdfff0d7fbe75bf,5d82ac240c8174085504f28a88966c3f0a416ce36579df3a0ed86c99885eff6a,741ff2c05c628c72a1c7622210a1c990093714be741c14c90dbb574c37985e9d |
|
||||
6afffb3f7e5e2f3afbe7e7ddbf2edffefbdd5bf197efcfefde3fffbbfffbaffd,fff7badb7fd7ffdf5ffbd576d777eec0efaf6a734f9def7ffbf57f6ef2dee5ee,ffffffffefffefffbffffff5ffefffffdffffffffffffffffffff7fffffffeff,5ab2d0a2b3685dfe256c514a182b47040e95bf27703257cda02d53b0587ab423,12954313f9d5ba1c9f92ca741470615a9ffb45ffb7084d67341efd90484f1ffb |
|
||||
8018e002800000c200000804b1000410200005880400540222a040906604a104,2605818a802045062002013a8218280a4188000018629600103800200115c205,fffbbeff1f3dfdbf63ffb2fb176fe7dfff5fdffff67f8d7fbfff7dfd3f5ffd0e,26dfe0a6227ce2165e798bd57ef155778ea7113387cd8a74229402bc1a4c03a2,34df7c7bc807272d40e8e96be67e688658fff269a84e73847d0f19745264db88 |
|
||||
0106008004511980000198a1000002200400980b940880688051182c00409089,3beea8695b65b5a652d01d51848a7bb2d4b09480d479503e1efa1a9db571fbfa,10d0c094280100001048c20011022908a42260895022803a6100000400602600,fe0443760fce14f2a2cf395846b900bc92a48c9d82356bdd14f67c769263a628,12e981832f56f2b4b06e668cd19042709354fda5393e6e1c186b61ce864346f2 |
|
||||
5fb27bfffbb7edffffffe5feb3fbffeffeef9dfbeebffcffff37ffe579bb36f7,0200004000000000080000000000402000000000000020000000000080000080,1b5ce38e8fdfabbf7bb9b27490378e718a2ddc915e41ebe6b58e23160db0b5ac,601690d18c9ca3e6935d05e74e2a0360e4f4f9f5b18a101dc70fe47509c5c9c5,6aff823e0afa2535480f808391e46622bc5e7c756d6d17a9493383508b9d0d02 |
|
||||
815f1d3ec709e3039231694f4fe22dddeea129ba20e3210251849775408d3761,d7b253d7b5ba6c36f7155557e8d947cf31745125f8ca14262b5f204f3ca8e970,fb6bffbb71cbffedb77af1b7cfefdebf753edddaffeef5f9df7dfef6bfffddfb,9226e347fad851784407ed24a09cbd59558eb4553700eb8e9b23a73b5582fce6,00ee12a6a5ab0e866d3dd246deda5f2e5c875605f7ce9b4c92edaa5347862a27 |
|
||||
41c76167d0d4049b88d89ab4d959ffaca35e116967b6a5711e165acc44754750,012004200d0640056c0008026083202003c0a100005016a708204000e0000090,edd93e79cafd7effbf63bdb7ffff77fefedf7f6fefff1bffef7fdfffffee7eff,a5f4abc47b6329ae1feb19a2d69e41cfe764844bc83b5fcdeb2b9f3d4d2fed2f,04f7669e362a367236ca1facc6de9c6080d12c49d2407d29354961aa7b3905a8 |
|
||||
0000000000080000000000021000800000000002000400000004040000002000,4000000000000800000000000000000080000000004000000001000000001000,883af62ee9b2537d42dba0e85739143c537d69abae2b36a38ff078ad95732cff,a367c1374265e763013ece6c989d3daec2ad3806707726fea55a651eeb19e904,7561559e50d5635a0b01dc6a6833c02358714883fda5cf2535fc31ed7542ff63 |
|
||||
ffffeffffffffeffbff7fffffffefeffffffffffffffdff7ffffffffffffdffd,001b31002145200021820000981785810c0488009016dc024800040112502800,9e1bbf08a2956bda30f2b3d2bc67cae990bd19234480b0d07a53c864c67942c0,c5b5050ed7d195ad70e199098a7281a2a4584af777f2407c74b75711ef3cdbbd,34012fedbae15713d27279125fa20d27374a8cbee8fa0cf1330318efb84c09d8 |
|
||||
fe9ff3d7fff7ffb7fffb7ffbdfffffff6ceaffffbfffef4ff6f7fdefafbfeeff,4b464ed735bd6c06ca4ec0ec65918ac97b57cd8ff1a7d112c08cc2e1a64aade6,80120429110b88000080a000a1c22a805000110520a834451810419193490000,1e6fb84b28c8a95ec09a060ca9a18e8130738c5d021b38ed5e6bffa276b832af,6736119f2ef7572de2ad39e16d05120aad1bdaca6a85141061ffa383f800b434 |
|
||||
ffaf6efffd35debbdfff7dfedec7ffeeff7bffd7e5feffebff67f373df6f6f7b,20080b818000010822829080043060880048008004301002040a400a202c0100,0232800010003462000a18115015204541082600000120201040601200868044,f2ab86de0dc19609cada9556514892472d6048012e9e8276409257b4dcca67ba,6ee90f728de36159a354d4bf4419fe5daf81c28d49018369d4a22f58a36993a9 |
|
||||
fddef7debfb7fcbfbbee7bf3ff6bfdb2c76ff6effe6edecffc7ffd53dffdeff3,15001e006080000c001d00008000400040288e480020800a218025308c8020e0,ffbeefbffffffcfcffcdfbffe7dfebffd4ff7dd37fbfffefbfe7bdf7ffff7bbb,30d230f1a8e61000b2a29c20b4c3294c876f3a38de0307e29521274c8c54209b,2ed50bb3c949575896de87f25263ba815972cbb679681255655341d14f35810c |
|
||||
fbffffffffffffdffdffffffffffff7fffffffffffffffffffdfffeff7ffffff,fbf7ff3dabfe7f7fbfddf9bfffdff7fbbfed9b7bed7fbaef79ffd55fb3f33f43,fffffdffffffffbffffffffffffffffbffffffffffffffffffffffffffffffff,2660b2b1359745e63b8741fb6d99e30103c0191df142c971429809f172ce78ef,681dcbaf7a6320191edb4ad9f161522b4a71b58be387519a23f7b7de60d71926 |
|
||||
0a000610000280234730084028a10150a488010060020d0e8340a1c842891102,629efbdd7fdbf9fff6ed7ff7ff7df7fb87fffdeabfbfef7bf97ff3615f3faded,9031908802401b0601100c8047002880802832003021000020000400281000ec,c7c36e9c4019c6324b71905dd148d657868496d26f8f0590714349066261dbbe,3daff6a1b1a45342503956ff9e9e41bfb8f623cd35b6cfa231077a60543ba143 |
|
||||
1c00120cba208c008150a04140000340204860032523044060104c2000224004,32284283304684003100322100104101500200b00121920010400b6213006080,62561843152b5e1ad82fc55c593db1325b8f08769241a89084172c183f8894ac,d90f193496321c7c7e29b9fed50e115b4229175247f688e8537aa9676684c64a,04b9a37124d8d4ab20035162bd0da7285f4e560db9d32cb5f77791a28e2e80f8 |
|
||||
117c956154dafd8720478f910964fd5d362a3ef9529505a940e147353c71704b,010c20009390510000081480431408000121045c0821028000042424c0c32220,931ca744988ffbbb03b5b7c50fb8accf329d2319a17b919baf3f453e2bc68976,d151c0203e440417d56c7f05df2cd0663d32adea9d81e66b202b098dd8774100,42f5ec84efd154ef4cd31a6527bd0f645a0c8aa318977ae003822a7b37a32e71 |
|
||||
9fedb7fffe9be9f3fffbffd77bffffb7b37f79676ffbffffffffffbbfbddbe7c,dede5ebffefff99b7f9ffffffd96cedb7bf7fcf62ffea5fffeedf7ebfafe4bff,ffffffffffffffeffffbfffffbfffffffffffffefbffffffffffffffffffffbf,2e644d0c6c5591d68c1816c80774ce6244ad76ba681bc741f638844156fe8b44,232a961f311a26423daf4f2789d88effa87e4b04ef661f8e1804f3712de6d935 |
|
||||
ca0f50dde4acc3395ae80fb9f2eb6fb04d0e7964b9ba1902a9a6ce1ba8be8e4a,0c15400022d4800c6000484310008100643800208c1d29082040804402203020,f7efffeffffffffffeffffffffffefdfffffffffffffffffffffffffffffbfff,0dd30fb8d3ac1325e7c552a2d45c73772fb6858a89bca5a41cabc6b463ea7676,20572432554671918d0fcba027be6019eba4234573a1467879574aba58c643c6 |
|
||||
efedfbfcf7faafedfbfbfff7bdbabdfb7cefef376fec9ddbeefff7fff73d77ef,02800544208008000214496a20310242c0202088680e01610809230080204180,685f352951375b8838f78175da376c318a434ab2c40a15f98767e377289c1e5f,707c3483fa4db383709cae18978dafdd3e98d132567905ad4c0dfbcd7a7dd092,46fb1b0eeff4adb7191eb634eb1aa002bcf5b648cc882da593c5183bddf1432f |
|
||||
edd5fb97ffed6fffffff5f6cfe77dbf6ffbdefffc6dafbfbf6fdb7be7ed6fbdb,340511900020c3d00202c582161500080102080100809012a101200a10000070,e678e27a707354c0a1dd07f6146daab94b8e1905b81e2411c967ca743e598c4b,97a584157b3e54c7076862ab6d4f70d78006231149ac07de5e118026ea930ade,532338d426b2d3f5ef6907fd02113bc8addaf81b21018d2008f73bc790df0357 |
|
||||
965cb914c962182e5584ecaac2357cba2468ad66a7f41390567fb4eb6b7b7c70,0000000000000000000000000000002000000000000000000000000040000000,10809404c0080a09a0870406288cba5084465226202403080a03400c44480220,69e10fbdbb0d273f48791cd3a95589d78ebd8108c062a4e4b1a7970ceee4faf8,023dbc9089045a696f7a6bbc2028a8a59aa66144beaf4da547b3dd50d057e3a9 |
|
||||
ea5f351e1a37b9cd7b0aee869b50cb3c0986513355aa2bdf9b828f1e7a1caf54,df5fdbeff3fbfe97ff7e7e8dfeffffff7b77feff797fffe77f5d6dff77bbdebc,1222404088040014001004480005a1882020204442010800a900000010000180,9b5187a16693880c2ac67123d4cfb3ac6d8d3c62c6b64b0721c89edde4490610,52f15182f1a2215ca3243d527de5f0033dcf7b58873476f991e244e3dba7d069 |
|
||||
afeeffffedbefbf0ebfefd7f5fffbe7efffbefffefff7fb9fbffffdfeef96eff,bdbfbefddc9fff9bfefd6fffdfeb80f7fb9ef9d09fff7d7fedbfefeffbf7aef5,a5979259456cff5d053e1571dc00177b605253aeab8be7a92bfa91fcded0b344,8eba7c7e833af653c9e57be1fdccd090740c537fda1869242a37fce7948d08b2,4a3388a0473e6800219213624f8b585c795a68a87773631bc384546a16a082d0 |
|
||||
00202324220598881004020384080000040050240a0464080020080003c04007,e5d11ff9fef8dffff737edffeffbffd7bfffeefffbb7f1ffe9ffeb6bbf1bbdfb,35bdce87e8434f00eaccdf08638b2180c1b47c9bc79608765572462b5f8e4c07,1d8a09d4b78c8cc88d146835028c070daf56858183c8ab9d19878125b39d240c,7e59bac9adf74e0e8f64833e8eaea0fba5a270f1dcf2e9b00f76f1e228dcbef3 |
|
||||
17c5c8d6e9a3bed8037ab77e354147eec4859fa19bbe67c5a732fe82f98b2f13,404441100490298001040501c070a0320421c22000838005004181a200801100,286b7ff73f7bfdb7ff379ffededf477edeffbcf9f9fffbdefbfffff74e7afbd0,c89001807a42f4ad37d9f1d563bd47a4ddb72f90ffd40dbaa1e33e464fee6d8b,2b7c0916733d3a4bb9d87cbef6211b669c4ff1bd1c6ff87150ec8f8ad21ec90a |
|
||||
fdaf3ffffd5ef7fffdffbef6effeefffbfff7f9f177fdeffb76b7dffb3ffd7bf,01854655e5b7bc0f1ec21318c453b8572f5e05a63488c667568275f8107fdd4f,ef6ffbbef7ff57ffdcbfef757ff7de5fbffdfdf2bff27f5abb1b4f5f7bffeecf,fce7ab24adc380e4b8215af50353741451c7446f8c9b21b2c355f1780d481b6e,5e075b02dc615ffd8adcfaa458ab916250cca29f8529be826dd628963e8c575a |
|
||||
6adbf3b81047f4ffc98dc0f01f9d8a681ef8ea3fce6b95e1c50f108b3a29ddbb,ffff9bfe9ffffe6fdd7bf5fbcfcff79dffeffbfb6cfebf7efaebaf7fbefbb1db,2dff7e7cb7ff5f7dbafff6ffcf3f9f99c3ffab13bdb7bffff6b6fffdf7bfffef,0be98088b82f69254a96f7a3171715f5852ac53e664574c706340cf8b9340195,32b7d88d66c5ee95aabc5047ff83091baba62e76c98e695f69d888582bfe1b00 |
|
||||
df8ffffff7abffffd7ffffbdef4ef66f4fafeddedbe6dfe2df79bfdfb2d7fbde,7d9eeff2fdef7f7f56fefff7fbf9dff6ffb55ff4776fcfdbaffbaf77db7ffff7,0442001080800039080800100100010a70608008600122080052810064808201,1aae48efe182f281013753078af8a5d637cbeec6c76cf61fe49790d643bc6741,0b992308f0878187141d350a7b7c61584899354a29a9e9de5469f290db04c9c3 |
|
||||
bfbef5ffbfff7ef777ffffdddfefffbabebbf5bf5f7fe7fedfb5fd5fdae73e6d,fffffffffffff7fffffffefbffdfff7fffeffffffffffffffff7fffffbffffff,3ebeffde7b7d7ffbfadf7f5febbffefbea7bbcfd72f6fddf7f6edfcdfdebad7f,0016d10ff465be3e68f956b789fcd084ef5e8869abe283809ad48720a8d1689f,14053fb20be990b71a2e5aa5a450bc3a8c971da0e6dce7889150bca76ae28c42 |
|
||||
3dada7aecf2d67a84c673038a209baa656c44482cf30ccbeee871b927246939d,a46fe65f31fd340f1db0a69a315fda31faa82bc35212cf3723d6e1db195f9b03,5401090008040c00b4c4000005424d499004c01509200402814839104c104900,e4f615524441aebc68c1d3a37156c60475399e8d0006b07b3d665f9722db5ea8,317456b26587198bf4f84303a814057f7061a37f5c608320eef54f87e8170128 |
|
||||
01488410044001910500011805000226184010070808230a0a0284b060408400,4912c0880009000000802801060420045010402a1031420120004040186500c3,bffffbef5ffd9ffb7dcddbfbf9fe7af3f95bdf9feff3f3ffdfffb7f36bd9efff,c28433def9e31249bdab6fab0f64d21d20dff890e4babd4f97537810393042cd,3d4057b15f6ab08d220e9b4ef2ed77c4c667625fb459735942e7164e77db2422 |
|
||||
1c9f58bcadfafac39110a7d8adb25182bdd5b8b69319e04b4e2e4b06ed23b197,fd3a5a2cb9b2e61fc5826dc431e139583d73e39b5cc53a4183c49508174e9dae,00004008c041d0921608102004c000820301011437800008022005c424103036,4dfd952086e2b1756bd1cf8d689effedebc7bab84cabb457f36d521e15ddf6c7,45bebf102fd881a2b00ae42fc8b49c1925d07263284d55a10e34cfa80891cca7 |
|
||||
538471ceaaa5ce19ed2ed04e03c54f7ed03efe828389c32a75e111eb8251eb70,1006040890004010206008302004000cb0483209202181a30a21813008345044,de4f57fe97ee3ddd7f7eeffffdb35fef2fefff5df6ffffbfaf7dd3dbbdf57bcf,19da1c6793d0cf8c4d84662556c1622ac1a163aa27f9c27a09b720eab21b981b,4f8b2117f373fab09bab07c0075d7b6f4d507b3843c50383e87712767bfd1b1d |
|
||||
0040c40081c940480c438404080004aa1e4008280404095011a0001800008808,0002000000000000000000000000000100000000000000004000804000001000,f1cdfedc7fc38f58d263c3ce9b3035b208a9c24cbec58d0f78147da325f3a64f,3835a59e724812416089ed3c919b96583b06268d5bd0d0787a15150f5ea99dbb,3f10593d104a9d551d8b4e4238ad62f6be390e1246d56258b53b83555a447a06 |
|
||||
1100a840022128d8122d80820020800082006830088011120080108162180000,9a2affabcb72ca04df235abccd9bcc60799b9657773d11bf4e23945d675cd2a7,fbf7eecfffff33fcf7eebf6f7fe7bdbbdfb9fe9d6f7ae292f77cffeff9ffdfbf,ad2dcb350077ec3b2892a3580f5f432b1cc0a4e097878eb1e66a56ab4a103b69,13aa19eb0091513a880e220e512c23672fc45e9c2f312c76a4c521e7fedf92c8 |
|
||||
0828d44800000098101007a4001008002011c01b406128000175020018020004,7d5206b785b490db379b73024468c487d8e61e0617e1d92531e297faea88bcf8,f3dffbfdfffbf3befeff77cffbfcffffcf72efeefef577fe6ebefefe7ff5ed5b,8b395bea129680018cc7216180537dc7ebbcecf02b9eb1e372be19f9ccd7b0c9,0284d39a12a014f410f0c123dede63f7287f1a53b5335f1d3e5828da79225b73 |
|
||||
178a00208454004440144b484244020020481050308800400a80020660b00050,171fce1b6f767403baa4f075aa5795268da03e0fe6e78b3fc77e063782352b19,59aa50800044010030b000121a01028ca702000401e04fa31241001008024020,6fd9962387b09ca912ef4c7d8655c58f7849a197d454d371681686e768f3cf5a,59d03c275955a7c14f40c491cf2dbf3980a5baf0c2e5f6351e28c18436353728 |
|
||||
fffff6fffffffffffffffffbfffffffffffbfffffffffffffffffffffffffffd,fdb77eff7ef9f7dffbef1fee3bf7ffdd7db37b67bdffdf8efdffbde4ec7fbbf1,016030040a440a0045043d5d026caf0060800a00a2102802e1034a4021410000,847e43663aba188fc82763f8ec7c8faea04dcc5803d431f9f68a8549badd3fcd,0e0d7e9892635cb0873a143a074152be03eeddad4b490aa2852b854511beed93 |
|
||||
a208000000f48140044800030210e84004020006004081013301404410400180,fffede7ee5bf7ebfce63f6b7ffef3ffeeff9ffffdeffffdfffafd6f7baf9fdff,120940100410540c0694001200807080420240010004002580292810400c3318,2f97ef3f01b069bcae988256f0b21d8ae2d1c09f7f3b3c47cdfcb14ac18d3dae,59eb9a331c806abd4ed8976d26ce2afd8d366f14ec38e4ccb85cae0130fb1a5f |
|
||||
fcfffb7beff7ffdaabf7bddbd3fd3fff95fff7fd7baf75ffdcfa77ffffff75b3,40188184a0a1243801220101e091009014210e210280940c111098060b000c60,4001890480811005140013a214a04a0210000a0204010084014345d001000468,596ca658547daf9ebfdf15eac0e350969e6d076713eecf2e37912a8813d3f057,4e0c4a871570fb4839d8bb75c7febbbaa864c32bbbec836fbf633c7c4a1361b0 |
|
||||
0000000100100000080000000000080100180000000000000800000000020000,feb3fdeffbfae7fdfacf7fbfffffff75d37fef7ffff63effed7ff7fffd7deffe,c0bef3c54cfeb9c197d128d6d1794bb1f3f1f0531c40ec805d17654a00bf1930,b57cd8235a81cc86ad02ee503f36bf8c8ebca3dad6a2e03ce194650381b0e45f,7997cc609d93c40f4bb033fea00f332eeaa212e66bcd24892da18857ea8aefef |
|
||||
ef7b5ffe7bfeffbfaffdeffefbfcfed85bff673cfbffe5dfffffd7fedd7bdf9b,f3fddff7fbefffefff97effffbff7f773dff5fff3feff7b75dffdeeffe9fdfbe,ffbb8bfefb9cdfdfbeffbe7ec33ffbfcfc9ffeecadcffbf6fb7fbb18ffffdfce,6b2333851ba74776777fee92b5c4bf07d50a3e15030431b70b990607237ef0c8,67b19325811bbd98180bde7bb27abca56fb89193976b51c145c22098a2570f70 |
|
||||
cfdaed0320c3c6cbd798df7c3aa9249982b9d39a87d70fcb108dbe2fc7350f23,5add3de837eef0ce8af2709e82e041053dd6e2f826f6a001e8d670b507042269,91f8cb47c061fe398862efa168c60e386e4149b889a45535ee94267dab593df9,d50c275053070d0525441f21d1f3e53962dc07622c9c29aabca9d2d24381bec5,4c25e259cfaa6707544482d6d5994b13966b2bf869d7f7a953647add4db1503f |
|
||||
44018004602069480500c455052880a806400210513b880180020209104102c0,ffff5f7abfbebfd8dffebffdbbfdee5f9fddd7ddfcfffebfff3a77f97fff8eff,ffffb7ff2ffffafefe7cff9d4bffe565d7bffffefdfffebddfdfddefadadfffe,7e6ecd8b980743eacc26152739f76217390919e4de410bc2262b3315bb186945,481e5ecbaff61388ea29b9a9fed8bbab5530870caaff2db84e84b532389d2b04 |
|
||||
00400109000200020000841e1200008008002ac4000040141120824108d10052,fdc779effffefdfe676fbef797bed7bbff7fafb7ef7eabe3f95dff5b3afdd0ed,000200000000000000000280004000000000c000000000000000000000000000,4041ae22a4753374539f8a1698b2b0da1600d4322613dd2cc94e3422c1874abd,7bdb364d3c152fab4e6a4aa51422c4bdd61f6a9167fa84ca269ad120fbcc6f00 |
|
||||
01c090294488010008414870024800010200080000020a48a420030030042030,0828000100201008000900088388a049c48100030c0040864394310905409042,fffffebe95ffd9eefafeebf5df7ffa7fbffdffd7dfcdd7febdf3fbfbea5bacbf,3e7ac06ebd3bd7cdde9c3138cc768cc71b2710ec7e53f96672e62d54298267b2,79087d8a5836fb6dbf13169c06888ffa92d36fe20b68a7356e818ac88cb8d782 |
|
||||
051f420f618ee2ebbc2e363af5803dd526a91016904d564849ca552d72479fbe,20401221080854a02a0100013c0602058142180024008064340001c30a098005,dffbfbffff36fefeff57f553ebdf7ef9efbf6dfeeafdd9f7bdffffffe957dfff,468548cde588d7d7e2fb7310ae105abff70bdbb2449ec1445d1aa76a9156dffa,45555d39097574c808fd19d0cb4c8021a894e7c79d8fae43b5f8779d6ff724a9 |
|
||||
ffb7bec7cb7f9fdffffedffff3dff9feeffaf7cffe3b7cfd932cfff7dfdfdff7,40040012070089080102188088000411081000880105085004001486414c80e0,ffffffffdffffffffffffffffffeffffffffffdfffffffffffffffffffffffff,52010e36c98a24d5f82a98ca710e82db75ea7e13637086a1fa77098e4189776f,46e78da02c2e960ad5c2d3d1ecd1ef20cc0fb54bd58c501f20609e4639e5f2a5 |
|
||||
8d421eb2f3c5c318a38e37f748962b0b60b3a346b9e3ab69ce816477631b0323,ffffcfdefbffdf1f73fadf6fffff33fcf2fc2ffe97edf3dffdeccbfeffebffff,002074b52250090fa05400080204020008002090081910420b80142000110114,c26610c2549afe2d574cf930dc61b3bb5b82f1255b64564f787c417614e99c84,30ca6da6a5c67a1824f8e67745e68baa5885f6e8a14720bc3a1cb5657d2fd329 |
|
||||
72000284889b001c0019104086600010a0db86443008904308100618100001a0,7dfff7ffbc5cfedbffdfd5e7ffaf9efff9fcf5d7e53dbffa9fff5ff7affdfdfc,fbfbfffff7777ffff7fdb777f3ef8fbd5effffdfdefe9fdeefb7e6fbf5fef96f,552b2eee683a8d1bc8cb760760349e53c924b1aa1170638e3bed0e95d81c3ab5,5444864aeb5c3b4e37e7aa28db57ca52117ad929cff577e01db5ce18be258485 |
|
||||
dddffbcf7bb7e854ebdf512faed953ddedfacb39eefb22edbfefcb7c7bfe7674,e4c12d689e41bc1949c3c6308e03cc522ce91343d274b323d8f1e93a5b7292e3,aea6b18787369f9bf230b16affeccbebfc702919f98714a0591376241318e457,0e9739da0848179226e4ff14798e345390e22b819fcad91434c8bcb0a598e92a,1881e673cbc3b83398ceb09fd94a957c5fb9193d78fa33f17a731508e8c0e197 |
|
||||
0110648402822091800042600a8100aa4080414480a515ec086004c000203428,fffaefeffdefdbd5f7dce5f6fbfeeff3fdff29ef9db67fcdefef6fc7f36bffaf,2730cc0b83ed392bf3c271dd0013fbf3d0e62438328cbd097c4adce3a7c606ea,690cac41f6b5ede8a463dd105c034fa09b341d2922ba597446a4f9bebf0fd94b,4c1d2d5220a5b1abd2aec2894aa93449951de92aaa0a0ecd39c75864a0c3d3bc |
|
||||
1481002000072400000044017010400600491320040182022054434280000440,0405209c80400800000101002000140000ea00088024224484404800500a0200,00120430112950041008000811204128aa00180402010204220398401018c040,0b611d61a878cf3a12d6126a29eabbe3ffcb9583a5a80a2968d0eb31b229f7ba,4c2fe58d77069e6378992a16767bca9d2d6b275f4070a455563ac2d8715afe0e |
|
||||
00400308000012061300408219d0102a4a1ca04206a081501000580400122822,fbadf7e7e8ffebdf57dffcfbdef4fdbdefcf77b7fffffbf7fbffee7dfff6ffff,001c01a01020000120142060c90402b89210000002050004317610000c00008c,faafe1d93080ead470557b70d65e8d5da7f475f32f031fcfb1cbf9ae3fa02c98,303e29fb283572e018529dc733e109cbed78728412580ed0847943142b3deb00 |
|
||||
ffde473bbf7fdefcbfe1fbffbfef2f753dfef9fbffebe8ff4fdd77effedffd9d,01004820418485510918a0000088014a00050e42105540a004c15b0020210206,f7fcbfcbedfdfe6e7fedfffbbf7e9dffffff13fe1bfffb7df7fffefdffbffffd,9b75b26219508637c655c5919abadb0bfda0b8c258db39259e86b575108f992d,25ae1825cc52a3c11cd4890fe8a69dd99bc9d79717e581f721fcc51c3c0b6fe7 |
|
||||
8c5a34d716d352f6bad1f164ea4e0e6e8c9f5a866db677900ed7144449bd525e,bfffedffebe4f3cfbfdf26efb7e3fd0edefee3b5eb7cf6ffbfff6b05fdcffb21,078810480004001a0129c4024e01012814108b08808c186028000000001031b0,a3cbc81cede766b0702768f4173ce5a7e2163541fe289ce63ef5e191aac9b011,64a31d11f99be2bb5ea8b0d94d619cb8e135e0858e42ffcb5daab3c7ac17bbec |
|
||||
2102a8210030004b14a12a0248842000080044054321a9800202008a80021102,85d00984e9abc4902f4430647ceebdcb9fd8486c8bfb25da9ce1f81fb3466634,895ecbc503ddbe8162c1ff6c364987bd57168bca292c1a3365915bac36388673,49ae8b53c540a2c9ae828e3c3c9ee09f4167ff4d10f07eac5ce530bc027d757d,297ad714d92471f7f058a6715a6e6e645a9c47d6cdb4ba1beee566bd5e64b8ca |
|
||||
ffecf7ffcbdaffbfa76f7eb7eeebf1fe4ff798ebffdff39fa7ffeffdbfff3f5e,ebde9f6cbf73ffffed7dff7ffb7dffeebbabec96effbdf7fefddbbf79fdfebff,32a0cbb709a551b6f3f772bf7d76ad5347494452ab3d4102431e5ce70182e2e8,7fd9901069581ed3c83d2b763d7bcd64cbed9d84e012c1063916379fa1e3e9e9,33f5c192923f65aafd900b92ad95a071c34b84904aca4bd56ec49da70421c482 |
|
||||
1001428800018b408a002a40320c00b006040004882a0021400b014880002000,042500006020a0094210220004036300052200b0010c804004040008060a8841,7ea626dab5aa71faf4772e16a4834dcc4a54d0894a61519f2c77d05d49815d17,78bef37549b702ebc5e491891cdff58b85b2c92f0de3be0f703ea719a866df4c,120b311c5008df00f1a998d0f9a2789b33dd4444c823e8fd68ec1956fd191b4e |
|
||||
fffffdffffffffffffffffffffffeffffffffffffffffff7ffffffffffffff7f,dad67def7fdee6aeafd58fdff5bff7f9f7effff9f82efefc7fdcff7efefffee7,3fcac37800cc2881081a04636df5a9ad2afd23cd5ba8a70d4a32addf92bdfb1f,da06355b9cf612036558ef275ce1de1f3b2e53c1f96b421563343dd67e0a5de1,4aff5c2a9a2ac9d27f1315c266c8daf71fe0570a0329f535a55c55215dc69e65 |
|
||||
0012082401008095014431300100298089a48410024510442000c0040609b009,63c3d6409687cf5c445ce1f4ab994134cf91564dc727aaedd66dc981b3b25907,010900008100400044063a1039c0008520001601495010040384301001411904,73595cd72078ee2e1bf095df744c62e35ebf68db9df736610099ac79967ab9ee,1482e2c970f1b7ecb87b98e9fee4b9648fd5caf2774dbddae2539e55313f6c95 |
|
||||
bfafff6423ef3bffeffadfbf3ffcf96abfeffd77fb513fb7fedfdefdff777fae,00c824f44a921204002b04146000110400a4208010a810009030ca80401a0014,382010012a0461000a81009102410202444108403b20088814020a048a4372a2,78ac88f3214ab55ac23faf1687e3ffd8555d731092ea7d7e6a482ceb0e966679,6b3df2b778eee60e0bf8e3d3bccd3b484f859ef56f9bbf3bf4f07f95e4ce6033 |
|
||||
7081430001010430004080100080001a04100c200028016004e092008600080a,270a0739067be46ef4c09c3603ac089bb26df5938b1bb4ff0ca53f8ea99d804b,054383bdd16b5452d7a96312a6ad7e0d4ed49abe5520c97241d8b1f16dd1b13b,3c45eea85f5e7cd6ba85b9eb7f15b59a1cd42265cd905d4e435e5f442a0a1d2c,3e455be220ac0128d47311e99f40666178c33e7947c47a5e70f0ef58fd2ed685 |
|
||||
9fde7dff5cddbfff5fbfff66ffbfbf6aadffd5f2e9ffdff37dbfbef732bffdff,828004c00070040c200c162282121401b9a015a108000401080404020886c459,5deddddeffff7d7f4f52fffaddbfffb6b7dde3eee7fffbbddaf9f7bbd2f7fffd,449fef121bfb01ba53b90fce7607bfb7ae09fd268df929a537fa20aadfe5aa89,168d346a861419295c112c9377f6e7554b719af2a54bebaae958ede2bc9f1499 |
|
||||
09cfe0ff544795cd0af3e76168de5e3b2785402debaca2a485d0ca40fbdfa088,eaf1d7369fffa743eaf7fffddffdff7effdfbd7f9fffb69e7ffffbaf7df7fffd,550014400c2086142000a0618400013d50a2111050216108480d040280480862,6f631b832607fdfc70f2426d221198d838479f8145cda746ffd7e262063bb22b,3459df22ceafbb6a9a369789309bec26f1dd3d5639094e3c9ecdab4912cf1c66 |
|
||||
7ff5eff7fc67edfcf63efefef9fd7f7ff9f75b9ffbbf3afbfdfdf7d5bfcff6f9,210291000000130c044140200920045004038084906000012020170002808000,40024401010300000485030948200083221b00b0d0800e022010e404080020a4,973ac3998290cd686983ded4471a000909c631e478721e02c1c8505287851866,2e49100b9c5a720e83c18eb6e9a03f261c8db41c95655c4b23a630a5b191577a |
|
||||
022988f088a80060080500493084080644400111008c158987101a5812408ab0,0000000000000000000000000020001000000000000000280000000000000000,49edd3f89971b010397d74c01f36849cffaffba78f4fee52e809fbe540d01641,a7dc4f379dcb683af83185932c3c36bb1e2b02476490171296d4ada945daf2ed,0e8959bf258f3d0d7a6b4b410bc8592fea3de0b2085ea51b55bdf501856af10a |
|
||||
4880010082e041100016830404004290290109081498800d4003044400924002,00041212050640802020444340000208820ec480501003300041893e00000081,75dfbffdbfebbafe6cb7fdbe97bff5f7fd5ff7ad7ff7ef6cd7ff7bb77f4ebf9f,b453921271ca648aac3feaaedd240e69e700f7b4b0eca23b0ac5fbb5b1035e89,46d7d84f6aa47d9f203826d9b1e30aa6eaa01ee540ddf8adb049b148e21a8020 |
|
||||
54d0248814090c000a0500100498a000806290200065090210310008e8440010,008c5010d80420c948194c0040026022c0000318580010c0744080b041200a50,8f49d8d51213eb73cc5f5c5e62fca4ff2aed509393b4ca272143111c77ab6b2c,d4ff3e85eecd72041cda47afc33b85068cfdf58ce31f0d8038ca632e122d0fcd,1bcf6e9a660fc14a57eb4d8173f0f0349ec92908958987fa29d7d7be0a166acf |
|
||||
ef7ff7ff3cdfff5dd6a7ffff7fffebffffe7bfe7bc7b79f55fd5fff47fddfd9d,200000034001400850008200104063150400428a0028008058a02c730824032b,0000000800000000000000000000000000000000000000000000008000240040,c75c1724f3b289cd726b41fb4287f8ad1d1165001791f181ffa0a4b5cb2220f1,1b00fba6c5017f482a3f3c1a373ddc03c56306753aaa282477782a852f8228af |
|
||||
8b1fc40f4e36561f73c9ab8c56aa052734bbc8ef48e9fc08a51b8091726993dc,efff37fd7ffda1e1fb7fdb7efdbf7ffdff377fd7f3dbffeffdfffcffe5fde9f6,0000002000000000100000000400000000000000000004210400040100000010,9c139d3d301849b7695f174b65e0a2c4d6bec4123f8e2f9b6f5fd56bb0ae015f,78fdd05d1c29e1dcdd2e960beac2ff36c06bea6f65838f47439364cb5fee9103 |
|
||||
fdefdff179ebfcb7ff7ea5fffb7dfbbdfdffbc3c7b6fe36fdbffbfdfdfb75fbb,21aef50eac7296d1995c7c316b91f0442c73883ba9a24e9361a8f0ef6bca533d,fffffffffffffffffefffddf7fdfffff7ffdffffffefffffffffffffeffffdff,473f5bc480f2562042e42e1467caa3f942f0788f8445a0a134f777ba01db29ec,384ebd0a995bf099bc0f524c04331d674d23ed9eb0fb95bf85bed080d52489f1 |
|
||||
ffffffffefffffffffffff7ffffffffffffcfffffffdffffffff7fffff7fffff,afca615eb00e2fbf7669daad369c7a22331cb1b3b15d9d8cf8edac6c5c340277,8410d2400204011a02490001a2040983204410040080700200c40a022a121002,7448df017bd0ae316b8c1210ff022a0366558e8179cb5fdb978644b9335c1758,2a47fc27d1d6511611ffc31386504ad7f83e04d44b10a66658020e45600f267f |
|
||||
be0a39c56f73ec640fc0fa099f2aca4aba7c8e673aaa20be473b2978a3c7c2a4,0a11014806608008b2e0ca020800110c103506304002488625020400f28402a0,000200a608204008402205800c210a080400849a840128154468402200011a00,b28e48f69df2f094e739e67069087161454d3ea5267b70ce451ac9b6ba98108c,7f2fdc8cc507505217548ca0fb2402c7daac455b3fcbb9b67ec5a2ef5cdebd72 |
|
||||
0020000000100000001000000400001000000004000000000000000000000001,637a4fa5ba1d47f7d1c8553c1afdcb9f7df8269d309690f3634ddc38eecedd1e,30a0d4dddef7376d021fc747d161e4d22d61786d256fc7efc7bb52f91329764c,307ff8e471d8942ec5596eb6c2040e2579f36e7d461afaef428e94cb5118db75,777db6976d39e38bebd02b90e1fd61c4cad6217fe824c70e8ecc26bf6d402c0a |
|
||||
050060c0360004239900080804184508010a0c00a218014816081c4000045c00,dd57076e4613d6a067f1d90565ab0c545b9f84b785aa7f3f0547a53771b96868,0551568008020010020724100a02840704720040084de0483404041890908230,5ab47c0deff279d7f0227334a3aaa25c6899cfd8375f0150723f0ff622b90adc,3b790076943cbead321b3b621a5694878e1170ad611a5fd29196ae1ca1b7b087 |
|
||||
fd7bcffffd86fefaf7af57eafbef8777ff17ffdbbbdbfaf777ad6dffeedfb0ff,0000002020004000000000000080000000000000004200000400440000000000,c38104240000208000084028a8020d8430060012406400428028008514880408,f3eb8714a3769892dd2746f61d39a97305b084d275ba3da89609346ac99ea353,368f27c14035c3011484b4fb6bb0ffe51da8ba521db0031c480665df653191fb |
|
||||
8cc8012fb1b7d967ab15776c01ff4d5a7afdefeb890c341ceabe554b9dd8b6ee,2f79833ba9eecd12b6f5b7ec49809d05f2b34225df507564f80c92db9128e925,00021000000000000000000000000100800000000020000000000c0080000000,2ae3bb185de774a9e369fc3548be9f42360532a406087cc71932d83fd68515b7,34987d5b84c854954e847b179dfd10700a0ebd47609340cfc1b132d806f3ce2b |
|
||||
ffe0ff36efe7ffe7f6bf7cebbfed7fdff95aedeeb7ffedefbffcedb5fdffbff3,04000510088000842400003009e030000b002400002008861123b04120800000,399f8a2204b420cbe4f07a3342bc2f29ebf3fece14ac130a70e98258cce77d31,ebaeb15cf811fb0d4dd9e3d7b074944bf4c36dae564f70e45eb25e20b6c7ebc6,5e1e9f7c51c9c5fedf5efa1b3f3faa07f7e4e5a4d4bc3db2f82c069427a98294 |
|
||||
f39fffdfef79f7a9efee57fbbf7d5febf7eefbb7fbfd7f9cb9a7f75df7edbfd6,a254217a0552c6276c42af4187c43206f8401888659c885633a2b81e903cac4b,10ffaab5eb43ea75e39d649c2bc1e10c0158f6b9118db8ea42320891923b044e,c700a9825e7c0b780c2cc4bdff790fc66e322898a91a9aa81e6797034b38a6bb,77399f431159a6aa7a878983c7801553d79592e21e28c16afff4ff5c10e8ae10 |
|
||||
2570746e9b3cf643d432831d01341c65e433c6c4dedfa9da263fa28d59252b90,d4ddfb28f15f7aa146fa63664989a9b8fa2deb935de8d720eaede9d1e781a04e,c77cdb2ffe67feefb7deffbaffdfeff7ff75f5fdbaafff6afffeecdbab75fddf,292ef3e010e07fd127aa20eea734798199bf4f6b9a827eaba5902a9c6b492c84,693c414c250d1d2853b992c439a02752358f7384a3e7742e53830cf892413c1f |
|
||||
a0d592cf80011199927bf5631ad755dc64571835c4fe6f0de82948a2845ffe5b,00000000000002000040000000010000400002002b2202000000000000010201,76fe7f7deedffbedbdf99ad7adf65dfffbffef9f9df55fb3cdde3fff7e7abfea,63b63e639fd8444fe30c8c91917185d551cccb9bd2908dd90ce241d40e1174ab,6c023ccbb707b7ba171056aded0717fbda11ac09d27143015ba4700891d7a824 |
|
||||
a00201026024030008800472c04322c4022000018200c5001160149920040110,504b2440294080009c40000260010001003125000084401da8c22020a2124814,90391dd457edc56c26dd8a2fac04881c33c1d823a28aa6824cef3eae56f59ac9,d0aa303f64be694bc5af6760890053c2d226b13e2b90e3b0a437f76ca09a153b,618b8839a8dd5e07f335f0082d097575f60c446e9f77ce167a88e926d7c23ebe |
|
||||
324f9f57378a04e2a2b00b0afe44cb746f13bd598acdbaf39f254a1bdc663f3d,83b24ba0831e439a2fee2d2619db58554984b312324e3eb7f7fed13c23a6f462,c86f8a9308e9ef7e855a1a9049bf9bc2fa5718775136b0c597ca9eb7d091ce8e,8d45b60b26e2f0331d84ab8570d9de424b45d8ba5b1b9d0b5f48bef6f07450c4,3f38a94022ca3a917a43d6d5f6377d5d6aa6875f810c9df77a4353f5d34d2a23 |
|
||||
ff95ff8fffebf7fdf7bfbfbb77bffbffef57e9fcfeb7ee5f9bffb77b7efbf78d,878275492a26f0e26b4d5660ef21fccf23b3bcfee7dda4f86acd980d80ec55aa,d77fb77aff277d35f8ef7dffeef9f9efdfffece1ffff31ffe7d7fdbed6d7df6b,890d4d683dc820dea9a96e912ee9332a86a4239d90c06e5a6709c1db4146d2aa,3b0db835ef1350548bd9946ae589c7b13ce4edab49c79063bbd0f9b26051ba73 |
|
||||
20a06593402089d000100a000141a4202011902202042a20040921459080102a,efefafc775fff65bbfeedfeeb3dadbfff3fefddfa7fbf4f7ffbbfdb5fdf97fed,0101000040000200000000000040000000000202000000000000000000020002,ef53e828ee5ee392645d728851aa68017c93f20763aa0ebb96d5c71448d0cd4b,229037c821809dce6b3ccf6d514d8e26b76d7c8dcf5717c7d07e6254fe5dfbf1 |
|
||||
6d5bd8418740fe24fd97b938a93a865676005556939407bb3fa0ca7e83d74e07,7df6f7f96ff7fbefffd75edeb2d7deafed3f77bf3fbdf6dfffffe97be7fc7c7d,0102210100442800020008c808400480091858902508001007800013592040e2,516c50c62506ffaa72d6ee7942c0056b212424b75d18afbcb9d316b3dbb9da12,22c944a249d9aac28bb2252426a982cd03eaedf0a22aac4d8f76dd7ec5cde938 |
|
||||
9fdfdb7cffd6ffeebff7ffebbd3dfd7d8dff6f79bbdfebfddf3eff77ffffedff,031600194010104105a9000810003010086a081690841e008a000880100b0280,c05915c18ff9288e98768731dcf16fd4a3e6e6152940bbae09110c1241f3f3dc,3b14f4a96d918fecc11da9a5d5c575b8b680a0ba7ac071760fbed78722b91c3e,03b741226917c1dc3183735299f4fbabd0f55be98de748aa55ece454c9806fe3 |
|
||||
0012000b000a9224010490080480a4a0a84c03400840007e60a8004200429040,0f43a47b3098e227dc180ac1d1628e8b2ee7508a43830871b7e5da85cab02660,0000000008101000000000000000008000000000100000000000001000080000,d62db2466bdefaf96290b3320e46790f07d09ca07c51ea9962177c438b004670,67904ccb66df2419ac13726369460f5bc1dfbfc5ae6f8baf285f97b6b20001ad |
|
||||
f96fbfffbf9ff7ffdfbfdee9f7bfff7effef5fff9debffdeeabfcdcfeff7f7e7,f7eef9fe9fffb7ffbd76fbbfdfffeeef7fffe5dffdfde5bfdfefffbf76ff7b7e,aee7e7f7cfefffffff7bbb7f7ffff46feb576fcfcdfffbfbbd8bdd8f7bbff36f,254b46b96ef2afdda4d30719f4c8242fa11f3a25f1ac5ee5496413dabaf70eae,18102a8aa55a9099a9973a056f8100cee36d745d9260e5596bd830fe8ca800e6 |
|
||||
dde17edfffd6b9ffffbdfff777ebd7efffefef1db7fdb7ff26b73fdceefef3f3,ddffff7d7a7fff1fdf6f7bffffbd6febbfcbff6beffb7dff1f7fddf7f7bfff7f,62f70a036de78c6b7f7c7b9690ba6cf9d3371a05a4c10673739cc7fb154effd0,7a84a9ee895a72167e7c3c9184e6c30107fcdd1e48d0aafe65828f4ef9cbd0db,748cad3943ee3f832bb3ad3741a81850c4e0d2cc958bbbe419f4ba4462bec62e |
|
||||
96ff6ece6fd0304287c4821e48d4c04da9a2ad630db2a903aab2de21c6afcb2b,4288001004ea6c5204921004021a04001220028b8004018150a0201386034086,5022209000a00400048403062185050440a0026004004840a001440400420008,14c5276403256aab7b4d23557597ea13f48ca0300e26ce9becbd60172bd0fe9e,3c1e51e5148acdeddde4439de69ab113f1be734ae678622d8b63d91b55ec8108 |
|
||||
0001801001100000000000200020000000800040000010200001000100000010,eff57fffffaedff1a7d79ffbb99de8fffff97ff8dfdecffdbff7ff9f7ff772f7,004882110000c5224000200026200600188810540020268d0040800408080000,b47a91105af112b20fd40c53a5bde415af2dd848d19df5de63184b2008531833,712db4c9970307577b5bd2420254eb6fc40f42cd339c600fcf1be53c04698c3f |
|
||||
0e005c064032248000850b035082262040840801022ac0041c02025201a00801,97bfbfff757fb67df26be9ddb9eebba3cdf7fb7eff7ffd4d77adcf2bfeef7fff,7ffffbffffffffe7d7fffffffffbfff7f7ffffffdffffffffffffffff6ffffff,a44241420540a535a2d2adaac393dc95fb58da1310c560752116652e5ee7ce23,0753bab4678927b4a3693346d5272a2459f8332f8623d81d16696d792354c059 |
|
||||
58a0a0001730e025000858208c10080000a044080b0001005080800200050150,b7ce0111146139655bb161e4e3e217a298178ab82f2d75265cbad6337c49a5b4,c2704c57489f03f0ce291425947c2f43a20043494eacbbc4823a54a927e41fb9,1497a540e5769fc358f10bbae4e9b0fd798f1869f1105d58dbd1dd084801e55b,29e2f8760936492247a2198a0ee2787b07482e42b2ce8671af83e9419c158cb2 |
|
||||
67ebfb7fdaf5ffb9fdf9efdf7f7e9fff77f9fdf77deff7b6fd3d676f793fcffa,000708c250448000800001821c00a004481243c00fe200110c00004000880004,ffbdff5fff5bf7fbffaef39c7fbeefbfdf7dfffffd7b4efed17ef4fbb3bdfbef,bcbfe065ccd9b3395b1356b59dc026a899ce0667a6e7d44a7f4fc0dee60f0252,1df7553c177984713d235e53f61a49cda05c6fc106101bcf99c040d7180c18a1 |
|
||||
2004004c4405400504480a10400c800040b026282080308204101004042c2002,3801902881100007800804440a00000a00848206040005b040508e6945040830,0100200000000090000000000000000000000000000000008000000000020000,0de09075d797f06ea2cc567da753b8aa00ec99a4534d20e233cc206d7ec65224,154030f141cb923d52644ca27085e030bdaf5bae3a8c8d3ff998196045e239c4 |
|
||||
|
|
||||
## bitcoin-cryptography-library: Random cases with 1 or 2 bits set/cleared,or uniform random |
|
||||
|
|
||||
67b2755aab08ff02e3120fce55097114c4a29a908b95a97681c691dd54c88030,272b26ab61483d3bb563c0bc852297d9d7d5ce0396503ba203b76a19fb57661d,df47ee04c663d38d474b4220cdfd5c85c541514d18ed70b81d5c82f8543d4bf0,cdb5d24c50febb9df3e02a77196c0cf04c7eca1c1f7d863dc2ee39d0e1180375,53b7813c523866c8d028b4c0381c9934c18c76ff97b41db5f5cafc6adfdc3d86 |
|
||||
bba65568eb970fd2f27db6d42888f2750fa17090cd1c75cfa620d58fd595db10,bf856cd74b4eaa98a001d33c041903d864f042a57c543124da4b54f219c4c6ce,9a7d39b391639b2521b5a8e8ebdef6ae01d95683b9f7c930e0a1a08815b5048c,31bb6201820f1450cea3927b802d75cce1da20c2503e0084bb93acf5a94d8fa0,6efc9440a2f291363489021b4aed68f1301c28756baca98bca16579ff0ce7f27 |
|
||||
791c4be3d16d4a5e96a421f64a27318e340bb1a8d420590277060f7ced85fa9c,b3dc791b75aae51531744fbe993f81de311b0f3ed7f76f055b927c59370cf6b9,d12dae96b7620bb02509c46a0c21f904d8a2413c23b15c840b2f965cb95ce67c,82efde8f3f1a4f08571700d98592562eff4d780f74fbd65e18c2a4cb63075f87,06c7e8875464e181f212f1011584b6a5d735d3950874a949de9ba438f59118ae |
|
||||
540cc167ec5c336842034a8933d4bebd6762161ed87051dfd2f826460f9c9b4a,fda392622bdf067c8c7b20e9aad0d7b0d8f8468d73a8a530cceb1103636ed25e,5bdcff27f2bbbfd6ac0c7a8fc4e13d5dd4573ef6b4e4c3e5c6c89384f1ea0bef,20be577604f2e0c4a14bd3a2a09b2b1206257b49835475ca42e3b6130d7b4e4a,1c25c32873e5fc670ce6bd5dad85accf46225cba0526354ccd411f0869091068 |
|
||||
195cda015d35f87df89590364a453c62fd896b32c79cdf13e5a8fbdbe33dc35d,93775258e6190dea421045395c132e5a99d1825c9abe91c1aeb8761746f8ed82,7788a17b03b88385a7c562ddb84f663007558444273bd663c02d98dfb9c9f0df,710cd1d26bf71326c729dd72e909b02886bf9caa3447882b8c9b411db1f04220,09163db086fbbc0441e711163e05ce9139ea71c838ace97361e8980c1c04c733 |
|
||||
d72815d6a9fd8d69cec171017c647735d4a9b208d63aead0d9634c012071e574,0c30bbf00e09c8c5dc98587ef6eefdecf38ee6b65edaf01c2019f7ef477d6f47,b8493c1a676c2e2e881fcd504b63c8b22aac9ef7b8dbde4316dc095f7072864e,b3a6ec0cdee405cb472ea34a4759a1aebbb943daa5c2dd5b48d53be3e0d306b8,35c60a7ac75aa2a5fb924854a310f3f1b2348b092a5615489e0156aa87a9f314 |
|
||||
62368226ebd9b441ad3bd12b6ab7e34c8471300339965d7a4909c301e2674735,5b1a9cc25becd31a3f78808e53d9e80711b1cd9e55394f9cf815cffc48072798,39f12a0079f55e12f1d2303128f0b9726f4e38eda1901c2ee6a9ab1cce4bd3dc,bb97ff6940f26c88e69386c6d5bff0130a8bcd3aa1579f61556400ad37598818,78b662d1196bb4e5acf8ea112322b5e1ce975acb1945cf71ed5a626149a1de44 |
|
||||
7b8b02ea63d855c39fa2c6164aa4df8c060a74dc903b19a21c5163af4ba1e035,0b31eefa28d1bcbf667b37db446aebf8b3088dbf8c74ba624a300e6d44553dd5,5d5ceda7781362c413a7285ad4cab2af9919d86ed7c0aa0c9f3f8639cb4a9004,8aaceed5eb70d19185630891d12697e9667b52094e4303eff328b130d6e0a426,330caf265fe233444e1c4e8fb7e75942774e5b2f472ce0e5c7206c9aa992ab71 |
|
||||
8fe7e823b1cc99112fcc2bdaeb323cb1c3c7ea11648bb87a6891d6fcaa82ee77,a550e4d400051fa7940b58e6803b6adf3099e7d965a3eed3cad236e094b5c5af,0000000000000000000000000000000000000000000000000000000000080000,a804c641d28cc0b53a4e3e1a2f56c86f6e0d880a454203b98cd3db5a7940d33a,2b5db8c453ae557d9b1a8cc768f92a6d928b905a8c9fd9eb2438b362a481f320 |
|
||||
9c6311c88a8e0e2bffc7a14fba755f013900dffd5cfdf623bad107b5e315ba6d,b9aedcc500d2150cfcad9f24808a73300022929497c7be5de5d3a42eb52f9ced,0000000000000000000000000000000000000000080000000000000000000000,efea68eca7a6c24f4e65eb211c3191636850e0acdc78d8996114ef13522f001d,2fb34e1c851e7e0cf758babf99f3558ee96b7c2c2c52fd034220f79f286a8ecc |
|
||||
bba7ee905b2754d93ee534d28bb49310ec58e937aa8381948dd1b6642915565e,e0ba00d5d16dd96c5dfae70a232d7535f4581e07fe3f7534452a5ee46a3c5826,0000000000000000000000000000000000000000000000000000000000100000,8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c,713d99fd142e3bb7093ee47b49133c5f38c76d0f4995b3573213001600f07aeb |
|
||||
66ffec60889c0a4d9476a62dec203cb02763d7b03c12c3b889ddf448bc069e4f,5fd36e79b20da4e128294888fb9f3812e0ecd43ca2ee7f62b1d1b5e1a31b57d8,0000000010000000000000000000000000000000000000000000000000000000,174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c,2ea7ef6fffb3ee7f10604363399081713d66ed7439749547dcd4c0edf2553c2a |
|
||||
33d6af99d7fb1ab2b1048d1def35c44d5a1725e73a8021483c6233998759625b,19d6bf0e4e35dad89de617bf5319811a677a6adc29430a1739756e47c96a2fae,0000000000000000000000000000000000008000000000000000000080000000,5cb65856175a5a0b3649d00305cb2b8e1a5cc0213c1da88cefede9bd7e9026f0,44ec1e4502869dd1b6d5a3e4a4536905d43739578c1a906476106937c4d1fe79 |
|
||||
c8f7d50187fc0140aac70b63d0770f305e8da29ddae43bd7d1b72ecfc9303c9d,a01d3fdfd23a9699dec7137e1cb18b8869e5899180f966795fb788bd9df6126b,0000000000000000000000000000000000000000010000000000000000000000,213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754,3593bec388def9c40842e154a3595e4ff14748cf217060a4c3ad551c64231206 |
|
||||
1165dc8ffea152cf35aa8cb0c06a353601bf3256c05cbb9ab0b50beacd734215,b563e840c1f6387f1882ab18f1827b38ce1784bb7dc78f16bd53f8904da381df,0000000000000000000000000000000000000000002004000000000000000000,6129fd509ee1a1b59e03dfa8fd6c2ae800f1d96c8bdb1114f9b3670b4d45862c,5c30fd05fb963e79b84b09236c5a7f65033eea0f49a680ee320b87ec7ccebd0d |
|
||||
128259c084c7dd309e6bb9c3d77e60b68ec6486a1344db56fc1e67e667302a8f,cb0239a91c292237037fa5be54c5fdf5417584659d73bd6e9d4e633e62063d04,0000000000000000000000000000000000000000000000000000000008000000,a94c6524bd40d2bbdac85c056236a79da78bc61fd5bdec9d2bf26bd84b2438e8,119f7acbe83dd8c1220063dacdd9fc8511dbfa08c51cdee6214e04b6271211eb |
|
||||
ac2c5c512363a501c261806c5c52dd8a2dc9ff9c313193b34e139c68929c4a95,3085e56dd632193eaf4830877c5a69a09c849be2b18c0abb6b666a9c3d819c20,fffff7ffffffffffffffffffffffffffbfffffffffffffffffffffffffffffff,79f1265e9e8233849db43fe3536b60d3d9eb2a51d3159b7c515742b3f0ccf617,2600a55eea9ede3d904bc992fdcc779ce9d3aa07f1e47bee240c3b3ccb95f666 |
|
||||
ff3917802281d6eab764ef5ed5848d520336a25730ed012df7f820de112c6d2c,dee956bd3b49301cfd3f709ccb49aedffc66c855dc01d9df693c470c35f28550,fffffffffffffffffffdffffffffffffffffffffffffffffffffffffffffffff,ef54981088d0346ae5d2b5bbf68a29f925f84e0e9fbb69e48294f65220b92db4,112a18047dfe3b4c01ff9e0093261ff4652c2ede0c63fc89b1956f2e49195adf |
|
||||
dab4394d53821668ee5a851814f8665c0ccc323c6e69e9aa138fd3c51be720c5,ea88ddf3cf66733ea14dba6461030fb4ab428aa16c669f454c3d36d7be51416c,ffffffffffffffefffffffffffffffffffffffffffffffffffffffffffffffff,e340eb146940c604207899c5a069d6abf9610612fc0d39b1e57af85206183399,2058f473da118013736255811d645030b77eb3bab993c7a3f2fa6dfb8203deb5 |
|
||||
09669a6d19add4dea4694b3f031ebff1f570a6db625de1086f583e640e307eb7,922a71bc12d3087ae9de9d28a08446ccba0c8064bbe01ae1a5ef03de9bba5172,fffffffffffdffffffffffffffffffffffffffffffffffffffffffffffffffff,e847af346ccdaee0e6a5be84247d4173bdcdb84a9dcc3b8255648a26875b9574,38a8b4b538a167b2c19b1ef6268209d5a0dd24ee7d276b576beabd6106ad52d0 |
|
||||
decc3ed34530d05160db48ee4227c81439c7427d1e24cd467f1ed246501faeb3,8ab04f246da0a6e38fb0f63b801a0f3216b894995ff08fad7401af8baeff33c6,ffffffbfffffffffffffffffffffffffffffffffffffffffffffffffffffffff,5fe49481a1b75fdd07ad271e3da98a60095af444dbb447ca9756b46891ce948a,735d845eee8a972a4d1e6d95c5f8318eece3e984840ce96be72c345c671034ce |
|
||||
23d914579a2e0530c6f3d68e0adf35b04f60375922be2750060e174ec25e1e4f,522517c4e1aa6b508da36706bb56917e2d84e13c1237270e1c7b562c7122dffc,fffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffff,49c3f4ba3a946081cb634ea9dc636c8cfc30d88427c7a2a2a12f853eb0de2f70,6a5c39ef439608ea8e36636cdd162b0cbc3841d45198efb4f998eaf5fb860796 |
|
||||
b5fd7f092432b084037c947780408a3d37aa35b192c10c1db6389563871abd33,932048851eceb7310ca6ede1dc2cc5b62f42fbeab8e7ff92f5b897b37fddde8d,ffffffffffffffffffffffffbeffffffffffffffffffffffffffffffffffffff,57d748985f36957f96a7cae51bbf25e75c53aa853551472f6490e685dff4ba2b,1c4dc75c1430bf843c28a1adeb4ba47f82afa965c6d5ed670826bc8d64e64098 |
|
||||
5049a09a4f0c245089264daa8d3140e6876325924489ffc53357e8672a0ff256,a3b703a424c0786bef127eb84547fa05c7180cf7c4416d0c8bc67ca393394f4b,fffffffffffffffffffffffbffffffffffffffffffffdfffffffffffffffffff,1a9f788563ae0a35876dfeeab66cf174a7b33d6a1d85e74ac5d92c7ba8b21a8f,6808dada320fd280258afccb61335b321ec2c4ea8cb9cada0cf58ca1e49d0435 |
|
||||
514b42576f9d13af98ce1acae7666f55995b10407d7ed21b57c8f1b27a12e399,0000000000000004000000000000000000000000000000000000000000000000,6abe9aef26513bcb79afb23409aebf352462f5b1336d9613066727b71edff6a6,6a32a1895639538504e0a396b562238b05adf321c207c7c2060f6d213fa9a07a,7fabeb9ae54005d239da95fbefadfc64d7a1caae208becc9d34a873ec5ca3697 |
|
||||
9c35ea4583f36f02aad6f066117897bfe9f2eb41a82dbb8a5b9bf607ccc2a396,0000000000000000000000000000000000000000000010000000000000000000,9575bfc1b97935fcca9bf7d4491ac7a030de708972dd230107ffc88867c85359,9d3ced7d84dcbbc9def7161e9f87fef9b177e2d61400f880396db5ab3d64e31c,1f221b0c4f1aac31f0058507035d7cd8fb01467b8d6e18b7f179d3b2f772aa1a |
|
||||
53aff3a714431b67c322e407f700d265f41137da69515c690697bc969ef5026c,0000000000020000000000000000000000000004000000000000000000000000,07d936e13b2499a597c5061195de82b02572654afaa72ed690cfc510ae6f8070,a07eda4530e3bbb2ade7d8e13e425508049c58cc63b2ebd00ca5f1db47a0f720,47b707952e7d997484d3960272a6e53559209007f1dae22f81279acbbbd4b59a |
|
||||
1165d4b2977d9038080ab2aaf6021f65a390e3797fd18ac42906cc0b38ac04a3,0000000000100000000000000000000000000000000000000000000000000010,f97ad8e4937e58ff21edd4f586e78e703a591dfc41e4a7cc3a8ba8f553905018,017595fc279dc740128c425ebf9e4b7dbfa076d11ce6f2798bbbaccefbfe2d1e,71d2fdb89c2e7a869a787564dad216751dda112397a7e806d58329f2c9c2ab4d |
|
||||
e0f160a15958f2c83cbdacf5a69d8ecfccc5a3339aa56cd11d490bd97b015b01,0000000000020000000000000000000000000000000000000000000000000000,83a2e6494c8764247afbdaa6bd8d3048e2baed4acb706192edb325ceee27923a,42c346cb29ba3c816d3ff76cf693dd26b6e1a1fd8556964a1b4624534e601719,67cca4e53ac92c9559bd67b85f65150dc54460588ffe1c5ab28c0cd269e71d44 |
|
||||
6cb1c18078887f5a6bfa9b3c9f99223eb34d131e71df095c82e8013a6f5e17eb,0000100000000000000000000000000000000000000000000000000000000000,31ef4466e122673a631577d89be009e467f97c05d86d1304de35a2b913db98a5,73d7029cb9b14ec706979b1f2180ccfce50f7bbd9887e52cd59bce512c76cfc5,5fc7d252ee4dd84b2ad4417060b51aea006b54719add87ecb9063bdeeb8c0895 |
|
||||
b2734713ffea4fd4566f1cfa3d1857cc2fca33f97751de819e3e61465aefbde1,0000000000000000000000000000000010000000000000008000000000000000,f887710908965a5f53d12380884b4a4378f6664e2772049e4d3b02bb4873f71c,c5174407701116be994b37f1a9eb58091f5fe23b7c5bc623e8c93cb89178bf61,4f450c8f3b1c081864bb6ad7ad8dc584e73652a153478e05cd529e08bc72e8db |
|
||||
34104708e788cd095e35ced0c9946189a137d509e172bcf54c87f9a5cc64636b,0000000000000000000000000000000000000000000000000001000000000000,743b882208bf0fb6a0f089bcd5b468a1b3695d600cde0ad6d6556253c9f8711a,a1dcee10598ce96497ab6ec9a6e657b74f370b313a8c4a2154ea19824c8621ce,20a7460c9fff1cbca88e593c523c7c9ee8a09f5a3518f57bbf0e0fe628f8a30d |
|
||||
fa8e8470d14c481ca1ad489848bd1bd73c829e76568cbe9d4942d30f6e913df2,0000000000000000000000000000000000040000000000000000000000000000,0000000000000000000040000000000000000000000000000000000000000020,e4ec5ea8e6ccd3f9c69e7fb88ae5d03391493ee17b324d092258879a2eb1eb98,61ed11d105b997d282653aed9feac1f1ec372ba309e23d1d6a78a4caca814cc5 |
|
||||
ffd13526b702e90ba676f294ab418d542e5df1194a99f6f857b9bdbe5d9f3a73,0000000000000000000020000000000000000000000000000000000000000000,0000000000000000040000000000000000000000000000000000000000000000,1a28e5042af0c0f6b436eb590497db5860011f4580e1765885289f612380441b,6d84613925a8cd0a8c6a8debb2bcc015559cf2cc88706c68939cdfc834929359 |
|
||||
a8296188ca80162411eb474a304c940983917a0252b898b16d291ae65e1ef967,0000000000000000000000004000000000000000000000000000000000000000,0000000000000000000000000000000000000000000000800000000000000000,c15c8c23d90c8e35c1a214dde2d4383c0735ae45bef61f10aa1a1c255984cf74,0da7fd00650071fb36cdbaf260e822223bff4673fa20ddd6d197d475e44cd056 |
|
||||
4cb73dda26e4f1653149db81bdb3707c104b816081dc7a06bb03c275f8e61c22,0000000000000000000000000000000000004000000000000000000000008000,0000000000000000000000000000000000000000000000000000400000000000,13d1ffc481509beee68f17d8ff41c2590f4c85f15268605087eda8bab4e218da,2adc4b0250eb76a88a6ced19b61f1b76e1378b8cb3557dcc26f324af0a1ff2ea |
|
||||
c037986dd3ddc1648ac0076838bddf908066235ec2e488949b3af5ffa42b7102,0000000008000000000000000000000000000000000000000000000000000000,0000000008000000000000000000000000000000000000000000000000000000,3c4e089cd9a6823d66a40cfc7ac96082e250e3149cf211d3b0e1103548dce109,6ad7c077878aab4dd0cf3746b08ac6b277962ce2abb989fa150e1e8342600608 |
|
||||
0490eee54c41db6aee81780795cb4608e7ea40659636dbbb12e78905948ca4e3,0004000000000000000000000000000000000004000000000000000000000000,0000000000000000000000000000000000000040000000000000000000000000,19cf034fc48b3be219bd648395e462cf9f374b6d86b2b59e2e1b16c6cde4f5be,0fe41fd0733e50dd9017b9f5f277c1451f3820da48db03a1e9b8e41b14f12db2 |
|
||||
1476feaa5d635accd7954e70e19d683b5f291adf0c619f106668a50028122d8a,0000004000000000000000000000000000000000000000000000000080000000,0000000000000000000000000000000000000000000000000000100000000000,da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1,327ccd64584cc83a7f3407cf6e410a3ebed73fb570e2542d6cdb8904693bdd4c |
|
||||
5cd964aa07a82fe298cd69f919941b095934efc507cc135415e6271f044ce4ab,0000001000000000000000000000000000000000000000000000000000000000,0000000000000000000000000000000000080000000000000000000000000000,796634e3f1ad56f0fdba069d9d07bce2ba2fd4f373ddd3ba7777bf279f1048da,1fc3a6e16ac8bbfe0f4ceb296ef2f61ea3d118aee8b9d856395674730c8f6413 |
|
||||
08d9f79139c7cfcf11e6a65ef8c07891650ebc53e5b03be1ce2913c8b92125aa,0000000000000000000000000000000000000000000000010000000000000000,feffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffff,742474470e33203bd59cc9d727e235586931659c1490127b4b0796e3d3d6752c,1fd0a7f9a0452d3df9d4c7396defa03052c345d848df88f3fceb71b927054048 |
|
||||
fbdf50c2bcd46584675f02db823f4ae8a8f39625e04838f91039f64579eb1a87,0000100000000000000000000000000000000000000000000000000000000000,efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,03eda9496347271a7762cb07c3fb4b734c1389460db41e4e1123e4845af4597a,7af049c5b645be1bf973f681c733c26491ebcd26e916e1dbee912641b2d08dea |
|
||||
9c416934711d1f74ea63c4d58e66d2eb40c8352ccb93e4e2795cfb70525ce731,0000100000000000000000000000000000000000000000000000000000000000,ffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffff,b899388d8ef03c0c0817f33b320402859dcd969a033f7c33cffbc49d383d45c0,502e163930c700bf789fa36efe1284e4f657f685991c5300058db3021e7a771b |
|
||||
7e9e0fda16252ed91bd7d45c9b602d34a4ddfb50055fee320a12091b56f140a8,0000000000000000000000000000000000000000000000000000000804000000,ffefffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffff,a27689d3183f17dfc613eba9425629edda487dc9c9ab86facfdb62a475eb5930,51e6b92ef60d9379562f67975575bea2b67457d6f2c33af14e0eb0b6bb9e57a1 |
|
||||
f58799fad606d3c5ff2af40d556a531dda571f066f83ef59686199498d6fb4cc,0000000000000000000000000400000000000000000000000000000000200000,fffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,3c426935ab57ac91ed8e456ec1d26a5a46c58b2bcc067f197fa3518eae586980,56f7d48049688e35260f316556aa5f412063499fb3f1638fab4e76e70616d76a |
|
||||
ea7c320582848c6c55d997ffb4935ac45b0b7b8769ec09b08c3751db133fa92e,0000000000000000000000000000000000000000000000400000000000000000,fffffffffffffffdffffffffffffffffffffffffffffffffffffffffffffffff,b6b64f287a5671b4b897d4ceb505159d6451c4e4e247ac365b5fc45327ef54bc,4cafd0a38e4d45fa50c05adc59cb90a1b6ffa2a10ec35ccf248dca14f3a52b63 |
|
||||
d6e02d425f83f37ef407034991371d362367d38078b43096a44627c5448c0c4d,0000000000000000000000002000000000000000000000000000000000000000,ffffffff7fffffffffffffffffffefffffffffffffffffffffffffffffffffff,806d81ff750c2e735b6c6a63186b89d8aa1c747da351e9fe7cdde71c4c66c60d,16776820d1d183e9ede847976a0a299718b9381e96d11371372e8c6cefb59ae8 |
|
||||
12012fd903ef3ab37645b31dfe36bf45921e911afd409c6052fb8024b781fc8d,0000000400000000000000000000000000000000000000000000000000000000,ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffbfff,4baef5ae7bc766db273af404b8cc2823b7edb3ddec22afc99c556648170897ee,24f8cf5667f3636d5356a586ad3982f06a91f2632f54015982fe97c0ec1eeb02 |
|
||||
a50a62b2e5c26ce913be2cde4198bc748d6b10017e7d20d297256dbf6cc4e329,fffffffffffffffffffffffffffffffffffffffffdffffffffffffffffffffff,f632687f2bf9e535358aa6bb0d137bf449d3bf529e131f9065f9b30fcf6deb94,5275beb5f922dc142f1761179398f4b39e3b046039b5c2d6fd7c21403b67c123,18c96833da47cf87284e7a3152998fc46d34224d6cad32ee860934317ec20f2c |
|
||||
113d828f5cb2a12d355ed1d675a9a155cfe526a4e989b6155d279df1be37a0a1,fffffffff7ffffffffbfffffffffffffffffffffffffffffffffffffffffffff,177b523f5048a8ef1b69ac9a3b62b65b45a52986301468c28636c2407f99709d,b239a446139a6b87fdf7a895f19f4b98dc8315129fe0fa6948647b898f539efb,13102594853b9cc1a593a070048cb7ad8185a827631eb2e167a086169d270500 |
|
||||
7569b65f9261aeb8ee55fa8e81570d61540b3bc780f0838931f11544fcc2d916,fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ff,2afeb411d480e2c78dd6e048f4728f2ab2758f6915aae91516dcd6a36442dbdb,6f60e3d58d0ec89d97a923e66b7e7d261e248663ebfeb15098032b0f8e7e3ca0,306f0dd068244d7b97f04a59596891ff5590323afcd100bd619cce993d014263 |
|
||||
c22988e5f2f753b61656cea70123f6267f3b4e6f05a32f3110c3a589382cda0f,ffffdfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,b39116663abd8dff64076321db72240571e279039c75fc629724327f24e55ac3,048e2c879241481212f388371d0c78fcaa130250f525abc9c432dc3b2c094373,7b560d2c8d77096d89743d82e3e3d9705a377e1e73b134206b851a574bc313c9 |
|
||||
b29d897c4ac2a7f56dd79a41c75452bac7f2c94a265d3242e3b1819575462bc7,fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdbf,73807b022e0ce70644c0c8388c6f91a7e331f9cff2028f1532f75facadfd3864,1679c7c48d8f3cab497dc3fe58039fb6d0227f7b7e78d59d90cc1a7977084b3d,0cc17b8fe478c0f8473046b2a9b4da0f8a6f45bc7af6fd7f466061dbe06d8bd7 |
|
||||
151a84158e4acbbdc465379802c81a240a1eec63ccd5b46c660f35a8df3c3700,fbffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,7d45a45545ec62083f483ab9cab76d28717ebb8cd7bfe2548cf10fdf142a8543,675b66ca7614424151813d7ad99f16b130b35e73f59b476f55c5881e237803ad,2a17798d66df239c4767cdf940f1d76ba65f0b37c40a5105d350266192710897 |
|
||||
3c1dadc69958995d7652d19ca84e74a9a6cb536b08f47b374519b5b981a525a8,ffffffffffffffeffffff7ffffffffffffffffffffffffffffffffffffffffff,5e5f098929dc639c3f05f9cc8baf70233a61ad513bb9e9bf7097b7ecc4345728,e135e4ff609c0dba5ee3ceab5355852b49e96f3591cbd9f557adb8ce89ec683e,5f85a452d9526097e3ed902b0528a23d83dc35fa8d34e53b1fa643b0f04ff399 |
|
||||
4c5841e4d71f3b81cb3f90994dc58f3d65907cb639895c79975110e8bf329a23,fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdffff,0d5ee5c5339406fc4eb6d77fe574529e03cc14108177461b15651f3869dd7636,5995f56473200bab7ff6e9265e150a94868954186129e9dbfeb947106931e737,4e00c50f18ed43760d3a9707b2754c0738f2720df16fdd97a0641b58a36883ce |
|
||||
732fd6d5fe99eda0966fede0f1bd43cf34a450d7e8af905c99d544a6cab78e50,fdffffffffffffffffffffffffffffffffffffffffdfffffffffffffffffffff,0000000000000400000000000000000000000000000000000000000000000000,58f099116eae4e650813fc8698df7f5cd50028649f853991e3fb545f4ddb7bb8,7a2ca587ce23aee5538190ada90f516156f00930b38d6a716484c5ed588eb4ef |
|
||||
d216858dd1103129929fbb3c33c2b83a1d346db81bab298ccceeb67ca46c8109,ffffffffffffffffffffffffffffffffffffffefffffffffffffffffffffffff,0000000000000000000000000000000000000000000000000080000000000000,2380c09c7f3aeae57c46e07395aeb0dc944dbaf2b62a9f0c5e8a64ad6ae7d616,247a3e35f58c8eec516a71aba4271bbec20235c25b6f35c9833623c64be23d5e |
|
||||
24b61e9746eb7a55e0fced75505420b743864bde5c07a53655d8ee66bd1fe319,fffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffff,0000000000000000000200000000000000000000000000000000000000000000,4f89bdee3771d350dad163b04cb18ad67ce5e9c55b58f0e7231047a60f59dd9e,671a271fd2cafaebf5442f49f1ab80d46271a6027fc152caa4d0bc5eafb014e7 |
|
||||
56f18fa55ccec7cc4681f50035a426090638b6651d4386db8589a2ec048c23f2,ffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffff,0000000000000000000000000000000000000800000000000000000000000000,c0c01f34ae41b8cfe466b4c9c6a5d5f614f570d6fcbef768a81a6c8f05ff4adb,3a7756a3d6268a3fc1701576aedbc795d395d45009b5693d5f544b17f6df2130 |
|
||||
f69f90fd8579a66266d091c8795b2cd965b2ec936704db1c747616d453c83d5e,fffffffffffffffffffffffffffffffffffffffffffffffffffffbffffffffff,0000000000000000000000000000000000000000008000000000000000000000,6930fccbd9a040974abf210f12b71d4bc7b1a6205599b01a7275fb40e48ff9b3,4aa4a71bef67f08109eaab5f8041b4f046763ae534a1f6a6939e8990596019d7 |
|
||||
20c544a5438a515bf6d360858fbd0dfa65ce5037eb32ba1963fa6f5978aa33eb,fffffdfffffbffffffffffffffffffffffffffffffffffffffffffffffffffff,0000000000000000000000000000000000000000000000000004000000002000,2c0232cec79c9ea2b5f3e2552856e5791a99222be42164b6b651c1e292f85ca3,6d8e3055c9cd01b1f7542e13ba5c3fe33592c9f1b7d4333abe841b09c07ce58e |
|
||||
cc564852c577153551b1d65e9ad0c61a01c5717b3dea930b4dc6e6b88ca3c033,fffbffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,0000010000000000000000000000000000000000000000000000000000000000,64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073,7bff10c0730ae847e6e65cf0945ea369005a25df1dab0750146f0d39b6122c18 |
|
||||
04586ab1e45f83e02cafbecb5e289b487e9de34f8d995d0958c90705899bcf42,ffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffff,0000000000000000000000000000000080020000000000000000000000000000,a9e2aa3aff4f65a192d9c8385c9cbf03032fe0b541454dd896d74ba0c6a7734a,6b5a390deb3e0d7fb1c7d46911d7c90ddbf250ead2cd00598824a0fa4596e9af |
|
||||
ab220063ad78873ff6fc709aba71832520ae00703ebaea121b76c0d2f47ba88a,ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff77,fffffffffffdffffffffffffffffbfffffffffffffffffffffffffffffffffff,4c0c4f9607428942558d420ec3597e789aeb9d7a7be4d8149ff24738795b08a8,3a3740f92fc6e9bfdcbcffd3c7de78bc9da0f51cbefe170638b01e9ac0dca473 |
|
||||
63fdcdf438af6f60a5d9ce0a2f59a64a0de90861acd06f3e75ce0e7fd7be8777,fffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffff,ffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffff,0a47cea7d342cb942bae42e1446799d598b95a5dc8ff46a84e2cc56b37202dc8,7479f3772aeda5a973bbbee1c84340a5902f8bf06e769d699c2658768a3acaba |
|
||||
95d48daa7a384535dc9ab15b149296f9de36e0d7ef547ecd4994344df786aaa7,fffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffffff,ffdfffffefffffffffffffffffffffffffffffffffffffffffffffffffffffff,6f41c992cb653b0e36521362111273094ad2254431c983bf42f6287c6f454721,72f7d6210412db39cc0db3aca6c6309cc64a397d639b0fccf99f60bb91977874 |
|
||||
8d1a84083651744f691ab50bc7464f180cac657f1dbfcfb50185893f97306e23,ffffffffffffffffffffffffffffffffdfffffffffffffffffffffffffffffff,fffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffbfff,97c24b2f804a67ca5aca3765f516806b6fd699eeebfcbad005ee38c6e5c63dad,0a3b7a328dca453ca56ed6385100cc613fc438adf7c2403af2963530d23623d4 |
|
||||
25202acca69844fe0a9d19447c663f7d264317d843027ab3ce412578dd42201f,ffffffffffffffffffffffffffffff7ffffffffff7ffffffffffffffffffffff,ffffffbfffffffffffffffffffffffffdfffffffffffffffffffffffffffffff,71925fb4c698e3b2ee7256dea33f50b43c34244f5e56448766fd56afee002efe,781d44573f6625a995315fd15a04cab788cb70aa7dd46d782b8258682d82a490 |
|
||||
04c48382b7759d195cd964c07725f8fe70010741b542be33b8322a8ede0ea96e,fffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffff,ffffffffffffffffffefffffffffffffffffffffffffffffffffffffffffffff,54ed32234b98edb1cb028a05e96e16d2cdc48a5e0b3465c5341daed87fa3d37e,140a8e197e8a1775ffab1f41019045fa37164f8f1f3674219275d2cc060fd5fd |
|
||||
797b2ae0e4ed81d165d86c449e0ec9da1115a7203df658484bc42699681289de,fffffffffffffffffffffffffffffffffffffffffffffffdfffffeffffffffff,fffbffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,0d0a29484f90b3f47ad8a5baff8a6f718eb1cb6d92bad812df4b23c4f4fce7d7,5e4111999332017d4243d4cbf8f0bf7d7447395f1fd88117ddf6d0424de6ae5c |
|
||||
b09d8c68edd9e21e3cc36ce69d0a1511e0602311071c1ee21777dcb1bf5edba2,ffffffffffffffdfffffffffffffffffffffffffffffffffffffffffffffffff,ffefffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,3b461b5a100aaa65220d9d516c730fbbd737e6d351adc08911162e57836490fe,6592abcb29c318670350e696a9f102780dd1270e0ef598e923b67033c1c55246 |
|
||||
0002000000000000000000000000000000000000000000000000000000000000,e09fbc3b96a7bfd5d9d82e1498ad474817efb957d15e908dc4b0ac5d44ac1d25,b11f6437748f82b7d49a330ca6943c88e0c3263fd38fa4f675e15de3e742e3a2,20256b206cedd0dc1fc88aea92b7d592f67629f094b05d9dbb0b9020e4002d36,228e99010aeb372a89410195dc94ff7caefbd06f102183733ac252d4cf6cd51b |
|
||||
0000000000000000000000000000000000000000008000000000000000000000,c60de2fa461496b6acb6a7f96eb5232997289c27d73f60cfafb72ac6cb0b5ada,d6037c19290b394958fa1036763d9043d8dddafe0a33010bc16fa5d5381f96df,becba1984469e8869c2203cc4617875a91085efdfce4587c06e3370f0530f8ca,3d3821145fa74142586b3e31f1d3e5cb4d6f28ef0cd110d05c31103819b1f067 |
|
||||
0000000000000000010000000000000000000000000000000000000000000000,fc83cea08c9e4bede48338c52f6e13b3870510e3951bc5ed1d449614c5e5a6bd,f4141f3f11bda1011fc1031c4d319769eaa9bc1a8ded559dd442d972f0dce735,1e3b1abb7bfea44e628186452a3c1cabfcb3e12b704d8e559c7fc871536701dc,525fb4eb84be41480079fb5413b0edf320f079c5b6acbf42d234bdc04db0a5d8 |
|
||||
0000000000000000000000000000004000000000000000000000000000000000,1ae6848fb105a85a7a964ebc3611dafd27318fe61104356297820598dddac998,1c0d0b196fb5e1eb7dffd53250ea6c814974c69e4176238c930e100816ac8a07,a5470552ceed8bbee5af25184ab93cc261b686d72ca54f01e181d1c849e2e233,40277d573bae90fd32840a1b46436c4844cfab79e91a33cfd7ec63130e93bf9f |
|
||||
0000000000000000000000000000000000000000000000000000000000004000,48bf282374491cbe8dd7e47049ea28269b0b2893246aeee3002fb16a97451e3a,48c9ba38f9f29c824365c4f7f22759741fb26014e5a1c60fbd9bd80dbc93f8dd,7896842bb52d4be6a14a58e94bb47227bc591a3f556944a90034adfe71f29920,78cf96d63c668ef3e20d58109d6849fd373593aac1d71872b302ed8431b71555 |
|
||||
0000000000000000000000000000000000000000000000000000008000000000,65e234af263f70618e92a31f34c35c09c764546398ea859d60195bf5d9de493b,34bb99add46dbb999576a1da1b67473a3dcea901ac68a86fd946d127d0a83227,000cd7c61a24e8e579e738fa44a5e1c2e53ca8af203e76fdbdfddcf14594bb66,743c8e1263f44cab9c87a8ee129801795bc092f82ec471ff98ee767addd2a93b |
|
||||
0000000000000000000000000000000000000000000000000000000000400000,41216ef6c47e36f0181913f51e85bb659193670b8c01a262e25d19b1fefcdb75,eaacb18d45cbe4d58aab33334409a4359080c8208b408deb322de78bc0484e76,b6fa5b09f52e529b2a9cb1c9bc0637c88794515b05713a45fca313eb33aa8f3b,49d672b24bf78fcf5320b2f5d17d061358d15828640927fdf8f778723074a216 |
|
||||
0000000000000000000000000000000000000000000000000200000000000000,be0e4e17787df5612b1ba277eece04d9a105ac7c14b8fe77dfa0d9f210e3f2ed,c0582c6c119904a987348b4207f209c5e176bdaaec14163a7874f1e07bd08233,d69d42a179519f445f58a77ca9ef56ae74771e7ab513308776e6561b8bbf9c14,11217fd9a7e41ffb8d44ba46f98e55a32d143adb8d67754afa7ebed4d49896c0 |
|
||||
0000000000000000000000000000000000000000000000000020000000000000,1c3b8a1fd1893fe45432e03582ce73681435fd4659cfc344d4fc470cb738e1f2,0000400000000000000008000000000000000000000000000000000000000000,61dc6ef562e3e6be027d43029a9cd3279bca69b4a29a84d708147b84ddf34c8c,341f38aa4de14bf13f7fa564aada4aa27509b504cb578ab86e94465c1eef3d60 |
|
||||
0000000000000200000000000000000000000000000000000008000000000000,73761022935e0406669f4f381351c51d74fe84e62b0d02001a912400d3cb7129,0000000000000000000000000000000000000000001000000000000000000000,e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725,5234a1570414333397f7f3c53a2c25dd6ea63cb03e7753a65586521796f4f878 |
|
||||
0000000000000000000000000000010000000000000000000000000000000000,effb013cb15b96141d25570b97fe37035e166bbe830f94c1aef44ff46f941e13,0000400000000040000000000000000000000000000000000000000000000000,c9d85d5c3c7389f33c67956149803424d5131a2cb69aeb9ba57b9c96d5f47e38,139a1143cba1e374046472e1896c4bade5f03f07127aa352ea80d1814379becd |
|
||||
0000000100000020000000000000000000000000000000000000000000000000,6c2fed7e13afea70ef3d5fee22fed6c7292d9db305bf8fe116474a2c48a7c9f2,0000000000000000000000000000002000000000000000000000000000000000,4b30cbb7686773e01ec64110abdb362f88531a825ba172953bfee2233bcdaf2f,5996055b1fad4668d115a95e0ca08bad1a88194217ce728cc2d445901d93e9b0 |
|
||||
0000000000000000000020000000000000000000000000000000000000000000,17c35f9d9b995bf94c0f3b2705be669a36c893cd66c54335a2dae0c5ba380c8a,0000000000000000000000000020000000000000000000000000000000000000,f16a409c677a40be402f8efb3752373caced053c6f702b828bda222ca412b6fd,4a90a4e35bd2ed456b496940f1f59a1472686cffac61212b7e4352dc77bf4e4a |
|
||||
0000000000000000000000000000000000000000000000008000000000000000,bf976a1a19411cce7db778b454ac5d4dc93e5b7f9972e1e66297debcc2f9891e,0000000000000000000000002000000000000000000000000000000000000000,ed32cad8d2cc998cd25317d4e4b87088e9de4554e57a8d70c0c6b0fc1da49e04,03e78fcfe1f334865da62c2a23d2a22a26a3805643d670196de5e46bf3c84959 |
|
||||
0000000020000000000000000000000000000000000000000000000000000000,59a31d52407eff3e0a7a94eac25ea9d472bc87213c1e964b51fd48b595815de2,0000000000000000000000000000000000000000000000000008000000000000,8f506f0b6c0b6e9a57a7f36d970ca4e347cbc92146227642cbe781d9f5362d33,786ffae58be7948ac1ad65deb1c71cd20469ebc3039611245986626e12d22da8 |
|
||||
0000000000000000000000000000000000010200000000000000000000000000,3314b2092684a4fd54a3192e668ac25ee4fca326fe6fb44bdb452df0157d906d,0000000000000200000000000000000000000000000000000000000000000000,5be7ea3519f04bc6cbeeaa0344fc90bb8e8462f6ebd890560dae805d414ff9e4,4fc92a6994d59e0e5e1edabce16355745a9af5016d519fca8e9eceea4ff1a26c |
|
||||
0000000000000000000000400000000000000000000000000000000000000000,149c10b9d680b5a23078058b4f494f6bbe299cdd704d19a5771c3b9dbfbef6a0,ffffffffffffffffdfffffffffffffffffffffffffffffffffffffffffffffff,153e6a5447390582c3fb55c2c10e034c337c4e630adaf193ce170844526d78a1,753dba43cf579c102326dc44531f5d3a6e4d8a6ccd4b4bae2c2699c4f900a655 |
|
||||
0000000000000000000000000000000000000000000000000020000000000000,6dc6dc0940ffdce1044c22c772ce59c3e4b9158444f961e5319df408b7ca0362,ffffffffffffffffffffffdfffffffffffffffffffffffffffffffffffffffff,b71fa88d5305bf7ae7e60d5da2a39c6148f3bcf1c2492963278888dab8e38f2d,614235093e04ae50d76089022e360c471e062a71b8cf0a0656f48abda640e28c |
|
||||
0000000000000000000000000000080000000000000000000000000000000000,578dd06b0360f6045c40e90c6366b35c87f1e2d6d2aa6925941f87499780a8e9,fffffffffffffffffffffffeffffffbfffffffffffffffffffffffffffffffff,44161f793ee6d5668cf56aa118ecee225cb86f91df3c98d65cec2d20c06890f8,32dab1b4954983d89ab1d5bd787d2c686fd5102762e691bc6eb7104e5900d615 |
|
||||
0000000000000000000000000100000000010000000000000000000000000000,d0c851d79436e3c63dabe54432bc304f654450998f57fdbcefd908e615f8fd0f,fffffffbffffffffffffffffffffffffffffffffffffffffffffffffffffffff,629c2805b4d2a831902db5a9460b52dc0edc7deb548b491112cae903085ce72c,30bec222985d3282b0396bde3967e0b80e5ccfebaf57adddadc7b217baa0a6d9 |
|
||||
0000000000000000000200000000000000000000000000000000000000000000,cba4afb72669cd3778ca34dc120d33ebbf94afbdbfac9ad343c4f9008b2e3af3,ffffffffffffffffffffffffffdfffffffffffffffffffffffffffffffffffff,b5f35f078c6b1119278dd516b386efc199484016ec7dca76d89bdb417688447b,33f6e708c19007f6e9c4793a62620999a8125e1677cfff3eb8d66ec3c882610e |
|
||||
0000000000000000000000000000000000000000000000000000000000010000,87cb5a0d7497806a0b162424fbb2c1791fe74b4e41d0fad3f38f862fcf20b8c6,fbffffffffffffffffffffffffffefffffffffffffffffffffffffffffffffff,1827c8ea3785cda38e2def913cdc972f925927f7b2c979abc06409fd937ae33f,103aa19533e0c6897748969f4c77ccc6f28d4099ec709e2778e9082da618e0a0 |
|
||||
0000000000000000000000000000100000000000000000000000000000000000,cd647729dc28816c052603f6088b0275b2b64fab414d4385b5e271b78cd1157e,fffbffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,0d0a29484f90b3f47ad8a5baff8a6f718eb1cb6d92bad812df4b23c4f4fce7d7,040aae75dc8e069ad5c63f280b1abc1af7d42fc5b98fb7d9b5998a37089b0078 |
|
||||
0000200000000000000000000000000000000000000000000000000000000000,85b88246aaaf097e19a1a815604e72de7733b9b713daeff73ccc79c6785900ad,ffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffff,d5eaf8df0b42a050511b3c9ad3af283997f67f08de4861c51072c24a209f39ec,40b77acdf4a7a77d39e9f9aa86e5307c72e59e7253de0e1b84b4e0fc8ee35d3e |
|
||||
0000000000020000000000000000000000000000000000000000000000010000,0000000000000000000000000000000000000000000000000000000100000000,2b54ca6bfadc105d68e28237b460da6d886986d560224c008ca84a71a8bf5a9f,1cd63ad941db776af867687c60b9fd41439e37be749877be21dd6febb5ce60b0,1d5f1e723cfb498edd8a22820b6690f22ce87b78ba9f627c55b7c1e95616425c |
|
||||
0000000000000000000000000000800000000000000000000000000000000000,8000000000000000000000000000000000000000000000000000000000000000,bf53369fe474946a758212913e60f2800ed4ee82ddabc2303c093e174d02b511,8e74d378bca24d9d25e133b97718c273a767885134cede77db2c6fbb29c955af,1e8293687c0c2ad5cf4093983c809ed018b4888a3aafbc813feb5a3ea1f02960 |
|
||||
0000000000000000000000000000000000000000010000000000000000000000,0000000000000000000000000000000000000008000000000000000000000000,f743a8d4bb6e3cdbf707e0a6d1e85b6b2172385241f96820ad023f2e5210769e,6b058c450fe5cac9c0d7890370421e3314e99c49e6795b4a44f9ebbe8e3ca620,4762f815069a07a45c061a6072b5259bbf09b07f53f761843b6759903c6fc73b |
|
||||
0400000000000000000000000000000000000000000000000000200000000000,0000000000002000000000000000000000000000000080000000000000000000,a4d391be33611546635fbff5afac9b7b172ea28287e20949af3d9ce9b131fbde,a4ccca7af9ec9fd786573b4eed8bfe371d2fbed1b5924558195edfa0219bc7a9,3c5bb48bcd1e1dfe8ec22d7acf17dfaae81c3cb929ede6a4f81ddcc26dc02490 |
|
||||
0000000000000040000000000000000000000000000000000000000000000000,0000004000000000000000000000000000000000000000000000000000080000,0c05a55710a2ee9e42cabc8fa0f22548e10e6687c6291e0359a2383bfc555daf,2da99c1ec77faca80722d533f2abbf96c5536f99c379555161d403f28990ef05,33041ad7a90a8cf043169728d440fd3cdeff2b6bdc09eaa03a8f1609a4b0ecc6 |
|
||||
0000200000000000000000000000000000000000000000000000000000000000,0000000000000000004080000000000000000000000000000000000000000000,74ff2ff9fd8428bc9bc5527e8a25968213da8c83bcfaf3eedb7d368897029e15,5c0fe1e7a07169b424fc657d2903ea4f55d27802a12964245d587f1ffd3e38ff,01021131eced22163718b3bbea45c0aaac8545a4ea4d3341a11c3bb6a65bad3b |
|
||||
4000000000400000000000000000000000000000000000000000000000000000,0000000001000000000000000000000000000000000000000000000000000000,2dc73680b0302d049b8db6fdd18bc2d04d885aafd47e991304ac48a8f88b39f6,3a59fba35e7f45b6e4132ce8d31d44fd1865289797f2d2684af00437e2b5aa32,74da64a5cb5916c10b2a814cd898a96f4e023e5180b14d8d5cb09e733b2cc84b |
|
||||
0000000000000000000000000000000000000000000000000020000000000000,0000000000000000000000000100000000000000000000000000000000000000,added81534051013dc24841a12d96b33777ca1d3189682e0b46490ff67d06460,2dc2da3e1b2aaf77ec787933a428b65018e2df8415f4cc001289274190716949,63e324ac9b5494ee3605664e0c2a908e7fd4602132e5560a5529b296624c9407 |
|
||||
0000000000000000000000000000000000000000100000000000000000000000,0000000000000000000000000000000080800000000000000000000000000000,0000000000000000000000000000000000000000800000000000000000000000,327f876c93652555fa80a054968b4712930dc93012ee6b8dc10263ed3b89a762,39b00f126d935b5540afebf56d2e971d5c49fe13a9745a9d37d44b248b9c5b64 |
|
||||
0000000000000000000000000000800000000000000000000000000000000000,0000000000000002000000000000000000000000000000000000000000000000,0000000000000000000000000000000000000000000000000000000040000000,e1efb9cd05adc63bcce10831d9538c479cf1d05fefdd08b2448d70422ede454c,1891781d862a3ffcbe2e8c40c614ce649efb2f8b9bac5839233a340d27193c99 |
|
||||
0000000000000000000000000000000000000400000000000000000000000000,0000000000000000000000000000800000000000000000000000000000000000,0000000000040000000000000000000000000000000000000000000000000000,5a3ce25b4d15b7e22d1469ddf0fc9f75afd7f12ad3cbda31f814ba1ebadb2a65,565f8a618ba7ebbd6192e743db5a3ce1ed8a6af7a88822882efdf7a1ee2d9e02 |
|
||||
0000000008000000000000000000000000000000000000000000000000000000,0002000000000000000000000000000000000000000000000000000000000000,0000000000000000000000200000000000000000000000000000000000000000,6773fd677c52e0640394110a46dc85df7c133f8dd4a28e661899ca5d82fd545c,1900e5044291b72177ffe292891e735679d1bb127d5f37c911e4f2d4ab490548 |
|
||||
0000000000000000000000000000000000000000000000000020000000000000,0000000000000000000000000000000000000000000000400000000000000000,0000000000000000000004000000000000000040000000000000000000000000,1eecaad4b8cbbd5151b3c3b942cd8c387926cf292e8e0023a716ad1a55f01961,11d9e8eabd84fd5afb8f234696a6a9219eee667ab0df9a30bf374e6db0df3a35 |
|
||||
0000000000000000000000000000000000000000000000000008000000000000,0001000000000000000000000000000000000000000000000000000000002000,0000000000000000000000000000000000000000000002000000000000000000,26952c7f372e59360d5ce4c66291f0b6ef16c1331e825e51396eb0457e8b000a,1f6e310052c2ef33469b274a8c6ce675904c491d7000d7cfd83bba0c1913075f |
|
||||
0000000000000000000000000000000000000000000000000000000010000000,0000000001000000000000000000000000000000100000000000000000000000,0000000000000000000000000000000000000000000000000000000000000008,2f01e5e15cca351daff3843fb70f3c2f0a1bdd05e5af888a67784ef3e10a2a01,3d466b95c48018f78091e187a1744fa7e0d7b97b46e1e17d22b15e3e81ddc2cc |
|
||||
0000000000000000000000000000200000000000000000000000000000000000,0000000000000000000000000080000000000000000000000000000000000000,0000000001000000000000000000000000000000000000000000000000000000,a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13,52529144e22f8caab5b51c505fe192e0697158ea1b49d12a3c9b55a3ad8a69dc |
|
||||
0000000000000000000000008000000000000000000000000000000000000000,0000000000000000000080000000000000000000000000000002000000000000,ffffffffffffffffffffffffffffefffffffffffffffffffffffffffffffffff,880b6ef14e02de5bf73592e0f85e58784decadb2cf3a12f4dcc76777e12fb933,6cf75f3741d3a5bde26a48c50a9cdb994fbed35f730574488453fafc14b038bf |
|
||||
0000000000000000200000000000000000000000000000000000000000000000,0040000040000000000000000000000000000000000000000000000000000000,fffffffffffff7fffffffffffffffffffffffffffffffffffeffffffffffffff,88dbf090a532d101c16f894e7807deebdb373859b9fc20338d8709f7819a9300,3389d5bd1704775e3873c6100a21b03b4dfdf1ff3bca75a87a7e0aeacd4a3e59 |
|
||||
0000000000000000000000000000000000000000000000000000000000200000,0000008000002000000000000000000000000000000000000000000000000000,ffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffff,a605a1c9406c6b5d69c66f43c6a95bd46feb9a321d50d0677d12f8c884325326,0fefc28c66dcc32266cb0748595478b8a0088dd0bfa33e409a96a66f72b5fbc7 |
|
||||
4000000080000000000000000000000000000000000000000000000000000000,0000000100000000000000000000000000000000000000000000000000000000,ffffffffffffffffffffffffffff7fffffffffbfffffffffffffffffffffffff,04ff2d1b1df0b1c1cf81866e46bb584530461342c070cf52eaf7e71287ee4b9e,6a0e7dc851f7ea88f8deaf6cc02bed07b4741f2b9acb9334dd794aa6bc16b4f1 |
|
||||
0000000000000000000000000000000000000000008000001000000000000000,0000000000000000000000800000000000000000000000000000000000000000,ffffbfffffffffffffffffffffffffffffff7fffffffffffffffffffffffffff,d8a66a3690927b50a485c9cd72a704fa2d597a9d01bc046179a05db0d6c39200,64ffef9dc23da8e1a5656c9c6aa3a8d222a629f290a9ee608d49a1a40798a769 |
|
||||
0000000000000000000000000000000000000000000000000020000000000000,0000000000000400000000000000000000000000000000000000000000000000,fffffffffffffffbfffffffffffffffffffffffffffffffffffff7ffffffffff,e210e933ee03c770b485b7dd32f8212a3eb8864f6f0ba6fb6f781bfe3033c3fb,408e986a8721d7fc5769f2b4c7fb80d185b97661b1651020aa99f826d4ce3046 |
|
||||
0000010000000000000000000000000000000000000008000000000000000000,0000000000004000000000000000000000000000000000000000000000004000,fffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffff,d8c40c899e4635db9ea86b0929e1193d6df6eb698ed8c1273b03df2aaa98204f,45d03663b2a057adfa47f28d4f5c3ffa6efe90f34670312a08081e17838ddf3b |
|
||||
0000000000000000000000000000002000000000000000000000000000000000,0000000000000000000000000000000000000080000000000000040000000000,f7fffffffffffffffffffffffffffffffffffffffeffffffffffffffffffffff,a8986cfa34ce79b43e81281e85ab4116b3b0cac4928a9cba71d77604b96a8ffa,524e5ad074807eedd3df25d166ec1a9bbec5d9f0309c43f3720455df71a59d07 |
|
||||
0000000000000000000000000080000000000000000000000000000000000000,ffffffffffffffffffffffffbffffffffffffffffffffffffffffffffff7ffff,479048eed165e36f58f77a68852f8923111f26c87426e01f402629c761b268eb,7ba4d6b0a409eedf6e2027934c4d9df725aee7ec03ab86a10479b71f831d3236,44766c04859650e90fa708b5e00197ff25dc0e6e379e90fac778259cd2763515 |
|
||||
0000000000000000000000000000000000008000000000000000000000000000,ffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffff,33bcbaeebc20f1b7dd22c33f5785e0b7f94bb6a71287b85023429c3bed11e0b1,44a0952e3b4b7ec57eb9b09d106a820b736f9b11edaacf1073642bceafcce250,314f9520d38e5bd1074da244beda11af5a9bd1ddc8c300e0537aa1c79c850ed9 |
|
||||
0000004000000000000000000000000000000000000000000000000000000000,fffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffff,f4abe2902fd001c7a32e536df2119c0bf67741f8a97d1cd7a694612592b24e13,bc289e5f555b6ab352c36df0ee8ecde44cdee041bc3c9234e2cf395b78373c64,76576f635c6246c33b73bdcc18e382a84a85c5b0d7c9a280b2ec9925fef2e375 |
|
||||
0000000000000000000000000000000010000000000000000000000000000040,fffffffffffffffffffffffffffffffffffffffffffdffffffffffffffffffff,bfa7c311cc62a1792cb9eba692c737205ce62090feed18cdad558ba9d6f24368,c04381620d2ae9def4de8dbb6fce391e94319dd866a3edc9bbb4ca1d984944b4,2c8c045b0902f864fa95969f257c5078bed6271980fb279b6b1951f9e60632c0 |
|
||||
0000000000000000000000000000000000000000001000000000000000000000,fffffffffffffffffffffffffefffffffffffffffffffffffffffff7ffffffff,c0e5def043f140d9613fea4fc9c2bfa969b04d6f72ee328189d77259db8b0e2f,6e518d298c4dfc3ee8bcefebebef60b62e85c7f3dbe429980a15c0da8e80e0ee,25e3cb427d16cf09bb0fcf148e71dca8be1b37643e856180735c6872eb911e69 |
|
||||
0000000000000000000000000000000000000000020000000000000000000000,ffffffffffdfffffffffffffffffffffffffffffffffffffffffffffffffffff,da166fa18394fc2c3683746ae86dd9617634128970edb75ff469fc1f30ee26aa,aef3f791a6ba162031d76b6d54d2bee0eecc70590582591c48ed8701ae56225b,5d3734e7c7f426234df43551f142aa2ffb7e9bbea846a1ab4a8d643e123d26a0 |
|
||||
0000200000000000000000000000000000000000000000000000000000000000,ffffffffffffffffffffffffffffffffffffffffffffffffffbfffffffffffff,b25a9c0d4ad4cb54486cb3adae1eef94eaee0402ac78b915dfef41f2e82b5b04,ed97343281f480a2ff04ba062dd5828f218da3db4620e3f1f2a1ee16778c3f92,2efcdf0d7576494975f83c2f17a469b28aa7828eeb30ab36d45d7ef278793218 |
|
||||
0000000000000000000000000020000000000000000000000000000000000000,ffbffffffffffffffffffffffffffffffffffffffffffffffeffffffffffffff,73e7a3cc4673bfd7708c66fdcd2a48f288ad6cda32c01f73a0d0b6a541f84262,071e9519475669fd1c06a9cf81b3aea0b6c4efedc65f6f8e0526ec8a5ab1cdf7,048ec828c6363ff6b7ad2a0b7659e37c3fbc13fbfc5e2514555214d1b2064c14 |
|
||||
0000000000000000000000000000000000000000000000000000000002000000,fffffffffffffffffffffffffffffffbffffffffffffffffffffffffffffffff,0000000000000000000000000000000000000000000000002000000000000000,ae86eeea252b411c1cdc36c284482939da1745e5a7e4da175c9d22744b7fd72d,6b2245de8ea2e4fea252b411c1cdc36ba0200b57bd505c402a5c845ede20aa61 |
|
||||
0000000000000000000000000000000000000000000000000000000000004000,fffffffffffffffffffffffffffffffbffffffffffffffffffffffffffffffff,0000000000000000000200000000000000000000000000000000000000000000,4f89bdee3771d350dad163b04cb18ad67ce5e9c55b58f0e7231047a60f59dd9e,1716a1b133b3381c1fcad9e5adc4018e9ef3252e8e61459a27b0923731757e9f |
|
||||
0000000000000000000000000000000400000000000000000000000000000000,ffffffffffffffffffffffffffffffffffffffffffbfffffffffffffffffffff,0000000000000000000000000000000000000000000000000000000000200000,ed0c5ce4e13291718ce17c7ec83c611071af64ee417c997abb3f26714755e4be,469843dd6708cb2e6279e1a67ccf9a8a87919acb1a30b011bf1557de95d2a7e5 |
|
||||
0000000000000000000000000000000000000000000000000000000000200000,ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffff,0000000000000000000000000000000000000800000000000000000000000000,c0c01f34ae41b8cfe466b4c9c6a5d5f614f570d6fcbef768a81a6c8f05ff4adb,527201d959988ac73b7cf5ecd8bcd2b89e1e61d858ed914363e69e40154f96d2 |
|
||||
0004000000000000000000000000000000000000000000000000000000400000,fffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffff,0000000000000000000000000000000000000008000000000000000000000000,126b57d05013936d6f3fb7bd33580a31fd453e4a86060cff467c44537f422491,450c190667ae4b2b9874ed2143a427d39cae9249d6ca1e610290839e34d1c0af |
|
||||
0000000000000000000000000000000000000000000000000000010000000000,bfffffffffffffffffffffffffffdfffffffffffffffffffffffffffffffffff,0000000000000000000000000000000000400000000000000000000000000000,f694cbaf2b966c1cc5f7f829d3a907819bc70ebcc1b229d9e81bda2712998b10,3789bc4f4550db6f1439bf02f4084aa608f971dd948f0ee589a69a04532d4cec |
|
||||
0000000000000000000000000000000000000000000000200000000000000000,fffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffff,0000000000000000000000000000000000000000000000000000000001000000,723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda,1583908111c7fe8556e6f6fa7ac539e4fbead952284c98edba98ebff6b46f5e6 |
|
||||
0000000000000000000000000014000000000000000000000000000000000000,fffffffffffffffffffffffffffffffffffffffffffffffffffffbffffffffff,0000000000200000000000000000000000000000000000000000000000000000,9c7be00b4ef4c444df85d5f61dc1283a23605483e1f8e934b3c210d22cd3c369,434b6eb40e105004eb6be24463f95744fa03baa8a632298666148a336d9fab1b |
|
||||
0000000000000000000010100000000000000000000000000000000000000000,fffffffffffffffffffffffffffffffffffffffffffffffffffeffffffffffff,ffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffff,4b08bd3b1ff47c1b06029a28bb1a7a69d20d10d0bb963a86a5224340f34ccfec,5a38ad36ee2dc5e0d8a70a99ac61d48d45b013b6c9683de935a73f45d653cc26 |
|
||||
0000000000000000000400000000000000000000000000000000000000000000,ffffffffffffffffffffffffffffffffffffffffefffffffffffffffffffffff,ffffffffffff7fffffffffffffffffffffffffffffffffffefffffffffffffff,9c5304c06e8d6d691a009604dfe69cffa285da8dedcabb26da7223ab20eaa11b,7967e78f15d69ddc5393fa305ef1517f1cfebc5ef224f61a13f178d0b1c08144 |
|
||||
0000000800000000000000000000000000000000000000000000100000000000,ffffffffffffffdfffffffffffffffdfffffffffffffffffffffffffffffffff,ffefffffffffffbfffffffffffffffffffffffffffffffffffffffffffffffff,e23fb02becfe7ee915b3ef6f0f8808bc959b29a697e1075d98d3d7727d5c0c0e,23e672cf426aad4e8155ef5d54745fa3aff869a5b31712d47ad7ebb71f2aae80 |
|
||||
0000000000000000002000000000000000000000000000000000000000000000,fffffffffffffffffffffffffffffffffffdffffffffffffffffffffffffffff,ffffffffffffffffffffbfffffffffffffffffffffffffffffffffffffffffff,3840bee83ea26d000b386607fe1a2e71f509d6537e08688920a8a615d2a869f3,0a009aee8694a4939c87535c8edad47f3425af8a069a22f9491b4325a53e0b00 |
|
||||
0000000000000000000000000010000000000000000000000000000000000000,fffffffffffffffbffffffffffffffffffffffff7fffffffffffffffffffffff,ffffffffbfffffffffffffffffffffffffffffffffffffdfffffffffffffffff,35763a8a076da0b2d8078c512c042b5cfb727ce3181a7ced086f5f0bc79e8695,0e1c54475d8741556b9ebbe7e0af5e2a576a1f5d7f7ad0a71a0c1a26b87ab546 |
|
||||
0000000000100000000000000000000000000400000000000000000000000000,ffffefffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,fffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffff,573917f2bb039a0d4465b702544d2c26c3822482b6e501e3f282a56ebaa23ef5,3c43d8b6269f8fc48c363ec43f2fbc632e12da03ef169d813ca166fef12a04e4 |
|
||||
0000000000000000000000000000000400000000000000000000000000000000,ffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff,ffffffffffffffff7fffffffffffffffffffffffffffffffffffffffff7fffff,5788beea51c90106fd056e9998b4880bc6e36fd86ba66a15467cc6b8a15aac44,3399c00527d6d8f71fc6bde66a5cc5916e31a6fcbf1287b402157881d758f346 |
|
||||
0000000000000000000000000000000000000000000200000000000000000000,ffdfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,ffffffffffffffffffffffdfffffffefffffffffffffffffffffffffffffffff,ee9d410d754f9f1dae476745bc4d2aac99e3e2ac5fb1e74d2969ba935ff11701,347913a6befef5cc7ac997d927266c9221eada367795a1fe5a20333bc99478b8 |
|
||||
fffffffffffffffefdffffffffffffffffffffffffffffffffffffffffffffff,4971e7cae34fc4a51c5a51a46e987b5e6c2247a82e056ec9c157ee7831926f6a,a5601c1f1770f0c786e6b86c76ad305305bb99df6751b6de14c4ca6c93a31c2c,14e41ac55cfcdf9726341e1e3638a1b2a9cf425c0f2a75e61ba05f68462ec6d0,428d7857637078ff31e6d71d30bdbc8dae508e179b64c7aab8a4274b1f0cf722 |
|
||||
fffffffffffffffffffffffffffbffffffffffffffffffffffffffffffffffff,260b1d388318f7083223e90a88fe67331b6c17387ed3c317dec0ca0a7df34429,f21fe8d960f3da2e8b7249f1ed82ba6487011670233faaeca3a33cfdca5aa0e8,07c67628ac3c0556cc3ae3660a2fe1119dd527564b048d16606c3e76b936bfee,5eb08afee066672614f98bf5bed49da7d8c1804ccdb5a68b0748e88a9047a09f |
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffff,9d05aa038eff0c589c8e786d5f70b7ce82ed0d68563c5074f129b5cd0c213c30,0457ac0d3d96280c41c208cb69c0d7fdf97e2c81300e25df4c7e56778415cbeb,b80a73e90183d965ad2996a8059f946ff076bc9ea130d4aa8de45af4eb496c9d,6b328bd42dc1cf77a45026032204b167968239a6827bfbf77941922f7d06585e |
|
||||
ff7fffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffff,33036dddf1a94ad0a89521a35bad4bf3e63906748e047e97735475eea5fce561,834b8deb923186fd61fd67d0b277922d1b2739ac3d38e03989cf2061b4f2c3a3,d729a429ec6d7c07386b64a49a8b712374ce5714b5ad94e7309e86666cf10a16,5fe60be0ba72550e9abe72e44be80ef76bdd2c7f461fe757fedf6309c8915edb |
|
||||
fffbffffffffffffffffffffffffffbfffffffffffffffffffffffffffffffff,ce41f184d836bcbb45a9864f8511a7b328a12efe930678cf731d93b68c1c3841,83a332d915747db4dbd78933c341ea8fc1223e21ea1b017ee21467ac12f3501b,9180feae821da5e706f9974f74c5c28409485821111e0f2d5a2fc0fe721ae6f4,034fe1e9c895a4105d15e7be3cde8863c77fa38205a5c80e5d08482498841505 |
|
||||
fffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffff,6bafe9ef28532a1a67fe25788a236206953f949eb888246a56ce9a838ba2bfd1,987b89ef51842d9a6eb4106fa585b1e6fefdb61bf86f83f22bff2d9c8f03e864,81cf02e38fb916d88bad3c33e73677ecf31124a1c5e6fe0f880e293c8478fa9c,53c18dea325d16da00dfcb08d731edd8956ef4b04738e74257027d7fef9e184b |
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbfffff,2bbef69978151517f5497c1a445429b4037fc3bdc94a8bac241b6fb4cdfdee49,5cc500b27c7f1eadea6330f085e31e924cbe3844f458cb944fed867cee16ab95,d9cc421abcb01307c85fe7365f8f8950354f49550cdd2acee74c843d6338baba,230f6a359d9dafd4dc40a1f08a5fa13f103909dac1b3ea30f366a9f6a7f730f9 |
|
||||
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdff,3019d7e3cc4cffd552c7f72c1e4b2ed855d40d4e1e2e2a0e4e77d89df12aa92b,05f06be88297de37b9caa80018b9b96bbd4997a7a96f7aa07ec07b21c6f1fbd2,8e88eef064fe6d25a8d9c2856dd005bb8c5a5956fc48a50dd1d7eeaeb820ca44,5fa905c8701966a496f1342c84a99a395f3c98509151b0b33868be6b65b74646 |
|
||||
fffffffffffffffffffffffffffdffffffffffffffffffffffffffffffffffff,7dad9598e8d9d75966f9414df88ba30ed98a1e669b1ed9abafe9e3ae02864c69,0000000000000000000040000000000000800000000000000000000000000000,082bc0e786f7baf5ae72ca79ab23a95f136559b242c617e0972f9807f1b06c96,71cea39f20253de4b4b853eb371c2b2f4512a107661bfecedc912b31ce8992c2 |
|
||||
fffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffff,a0ed405c5dfb3daaf8364aea40301ceb4b29583320ab86e6bd2da0903a379ac4,0000000000000100000000000000000000000000000000000000000000000000,1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19,3ecc6ba8c48348e35c8faf0a166f037fdd017e861531e115e21362913236a4ea |
|
||||
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffdffffff,d9a5465417d74960dee54cacbbcd03645e80f9279d444e7459eda6cf30b2b058,0000000000000000001000000000000000000000000000000000000000000000,85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751,07784f46998e9bfc3d5fdb15e911878fdbcc5adfdd181c1d38521a7e2fc23d47 |
|
||||
ffffffffefffffffffffffffffffffffffffffffffffffffffffffffffffffff,d137ee2f471685a2aeb0282bf71daaa30160969a7975acd13aacb23ad9dcebcb,0000000000000000000000000000000000000000000000000000108000000000,c62a2956d11e1eec4fd3523fa23d1b4a9f9d1675737347cca17de6720475f303,32503977c9fbf4dd80d49c76669c43fc3274881637238ef06b0936601a9b9682 |
|
||||
ffffffffffffffffffffffffefffffffffffffffffffffffffffffffffffffff,cb8a0f9bec91d2ffca727ea057ae35da7d03a8ace658f63d9fa01a8475cb164d,0000000000000000000000000000000000000000000000000000000000080000,a804c641d28cc0b53a4e3e1a2f56c86f6e0d880a454203b98cd3db5a7940d33a,5d763787fdd2b295ffc9df6a229f13a4adce58efe2f1bf242910493173a43910 |
|
||||
ffffffffffffffffbfffffffffffffffffffffffffffffffffffffffffffffff,2490beb902d5187bcebca920f0d80a69a60e8b1c6a64af76234242367d148f5f,0000000000000000000000000000000000000000000000000000000000002000,423a013f03ff32d7a5ffbcc8e139c62130fdfeb5c6da121bce78049e46bc47d6,38e981b61cabb0130846c5cb7275b4b025deb0fec0f26c6064282f4fde677ed8 |
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffbfffffffffffffff,b96e18a44efbc28c4c569d9624b7afa91a5b51037907db7faa808a36ac48d63a,0000000000000000000000000000000000000000002000000000000000000000,0eac134ca2046b8f9c8dbd304fad3f3c045ebfdb4ec6ed3cfe09aee43ed2ff3e,4db572c4e1ee30881dc11499af4874af14ddb2f1b52c33f52e89b4dcce38ab56 |
|
||||
ffffffffffffffffffffffffffffffffffbfffffffffffffffffffffffffffff,bae54869c43cdf7b0aa582bd27640b2e00d526eccadd854093e5d3b2375b35c5,0000000000000000000000000000000000000000000008000000000000000100,28c0c453944ca52c55aaf168d063052cb6a74e418264963e717bb0432d7e789e,147248e1adec66403714485878c76dcc035c4e694ef4bfedca7eca30f8d3eac1 |
|
||||
fffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffff,9033dd772b9051aeec0cb9b370b57a49d9e7d242485ecec5b328b9962bb3a619,fff7fffffffffffffffffffffffffffffffffbffffffffffffffffffffffffff,202cbafa2db4f8b6df93d9741006b2216c32e61a457c056ca60cd6000348e884,354de6d87e0b3f7c6aae5bb04f699cfd43a1aae9912bb5d12816dbc3bbd4ef24 |
|
||||
fffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff,2b734ea2cffe952117b38ea24eb22114bf0fbda5e388076848cab4afeaee180c,fffffffffffffffffffffffffffbffffffffffffffffffffffffffffffffffff,2b069092d1c9c2102e29d5683ac53e696a430de573e64238c547aacb62a2b157,75eb2c2d93be000c5bd2821fa7c3123c3bc2904b8867fcd7c2e7382b56c1d08b |
|
||||
fffffffffffffffffffdffffffffffffffffffffffffffffffffffffffffffff,596faf7c48ede147c9b8b8ffc511bc462966f7eeac88e26a4bc644a58b84e56c,ffbfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,c357339cb5b76ebf94138535b9a189ad2dbc30187654facc31b6e64661bdf812,6b3f54b1f4ed11e1a603912403364a0d7b8631990b001d1765581b689ab0217c |
|
||||
fffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffff,e30e568da7ea244e5ebdde0b19e7088fb29bb3a6543b61c21e64860273007296,ffffffffffffffffffffffffffdfffffffffffffffffffffffffffffffffffff,b5f35f078c6b1119278dd516b386efc199484016ec7dca76d89bdb417688447b,3001743d9fef88d798664c8539345622cbe550c885d3675143106f3651e273a4 |
|
||||
fffffdffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,4fc526e40a88e4c457f3cf9c6b335c52d5d3ef587eec9b64b92e5fc122ee1577,fffff7fffffbffffffffffffffffffffffffffffffffffffffffffffffffffff,7c0e959c7278e806e6b0db150b6f40482e571ac9953f42d27f496bb5d204d9a8,294e62afb0f2847d4083cc19c4ff5fadc2f70faff843bceb986e2e8985aa0326 |
|
||||
ffffffffffffffffdfffffffffffffffffffffffffffffffffffffffffffffff,7b2a1d154331c7d407f6cd8e2773014873a28b8f57e84fe91d742dc349b0ba1b,fffffffffdfffffffffffffffffffffffffffffffffffffffffffffff7ffffff,c938ef1a6819796cd85ed03eadc0497258bc7ddfb0ce155f747b502b6ed10d9c,6334e90cc9db94cd9ec4198638920085b993bf7791c89a9a938d8b7d47bd022d |
|
||||
fffffffdffffffffffffffffffffffffffffffffffffffffffffffffffffffff,da3d6b03fc34d533059fa8704c1b87fe37ae9e3ca402d7745be0f9a8a901d624,ffffffffffffffbfffffffffffffffffffffffffffffffffffffffffffffffff,0d5613f0e3c0ade1c1c644a635e45b820172634f1078401f2c672fd6e802977b,117163b416d2a7b5bdc63787414a857493dacc8dd11bb2f9512d65aca28f53ef |
|
||||
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffff,97e070e32ee26ced4b6563b7433ccf746c63f203bee8feda2340ab05e27bb621,ffffdfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,38a9488cdd62ab995ad39dade1696e0d1a65bcc9022149a5dbd7e22e35f7905e,72b56bb6424d88f28381936deb60a8b7d8d96367c5233f0b6b2c95f80818cf9f |
|
||||
fffffffffffbffffffffffffffffffffffffffffffefffffffffffffffffffff,0000000200000000000000000000000000000000000000000000000000000000,915c982576889243e72332cd337a7531fe22b4eccf9bd954bb9a7a7f08341a49,51527197c8267c255e7d3f71d5b789235646eb32e5e67babd96c9dd4cff7b6c5,663619646b00f96e6249486e987ff348db258e71b3cb90ee54bff644971ebb43 |
|
||||
fffff7fffffffffffffffffffffffffffffffffffffdffffffffffffffffffff,0000000000000000000000000000000000000000000400000000000000000000,e1346597383d1046423e81e213651fb00575cfb418820ff235917958057a4e61,e196448d47ae788e762fd9dbef8ceb1fd0e507f09b804f229019ef4c2c0177f2,20821978801075089e47eb6a6294074ee253b8ddef7e653b4be456ce3c237d07 |
|
||||
ffffffffbfbfffffffffffffffffffffffffffffffffffffffffffffffffffff,0000000000000000000000020000000000000000000000000000000000000000,4f5c33141ef485423645a793c44990e23b64dd7e98c562f2a603e3908f78e4e5,1718c049c233ef31f3c180321d85f81179cf48b6ce34e5b3eb7ebcfdb10e0d4b,2b136e902ce0e755dacabfeed1ad0bd8cb65b2b9213b1ba3a49e759e372e3854 |
|
||||
fffffffffdffffffffffffffffffffffffffffffffffffffffffffffffffffff,0000000000000020200000000000000000000000000000000000000000000000,17b57cfb57444cfa5cbdd1d149fa493cccdd5aa06e2afd3d90a2fdc24b975dc2,f705472be4a5cb203ece0e14b96b4e4d8767782a81f110bf3e77620bc7d8ee83,79b263325f3b79204ea3a02d2c6e56ae41f3c8b459aa5ae0bdf8bc7ecfec0a77 |
|
||||
ffffffffffffffffffffffffffffffffffffffffffff7fffffffff7fffffffff,0000000000000000000000000000000000000000010000000000000000000000,db288b66a57db435c10deff800dd181a4c1c194782ba852a0f7adc4f9f1db4d1,b257001ad19f027879fb46bb6bf4f2dc6a67ae8ac70ceb12b19c283e7a761c96,17093e32ad376cdaee93e4a2ce3da59bc56da1fc3b4b3a346a862912ee85e144 |
|
||||
fffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffff,0000000000000000000000000000000000000000000000000000000008000000,12ebbe6640b0ebfcde17dcd79b23e6139991179ad03c0a66babc39919396a8d8,242884e7ebbc2a1a713f78cf3e155fb18ae51befee63036971df830cb92435a8,1f024de10125c8dabc024689491ff9c00fe8e2ea42a5bfb12ea97a47deefc715 |
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffff,0000000000000000000000000000000000000000000000400000000000000000,fbf7c120677aa0390c6c09bee508b5d9128f6897b285be795d41a88fd95eda05,168916be83a5e0f6ac77f582932543e823690a75e70eb5913ee05e0b83e1b1d8,1c9b5b6c7adb62f5fff70e916683eed972b6b6336ec112e3eae3219fc1bd8f0b |
|
||||
ffffffffffffffffffffffffffffffffffffffffffeffffffeffffffffffffff,0000000000000000000000000000000000000000000000000000040000000000,4dc98b3b49efe43bfae83f0f204165d2a590d648f6ef16bb030f6c7e1463e3ed,071a4ddc6990e6e8f668fa6d6f6b93f29445e0cb99ac7fbd15c47a196474ca0f,3aef14f4230c3cdfdb67e3dafee07e1b994f5eec013adf43cf07d1ed084ebd2f |
|
||||
ffffffdffffffffdffffffffffffffffffffffffffffffffffffffffffffffff,0000000000800000000000000000000000000000000000000000000000000000,0000000000000000000000000000000000000000000000000080000000000000,2380c09c7f3aeae57c46e07395aeb0dc944dbaf2b62a9f0c5e8a64ad6ae7d616,60c35041852843424d971fef1102ee9cdba56b10eb95809ce27e31943a3d19df |
|
||||
fffffffffffffff7ffffffffffffffffffffffffffffffffefffffffffffffff,0000000000000000000000000000000000000040000000000000000000000000,0000000000000010000000000000000000000000000020000000000000000000,b73a7e3d73850aa2ede06af4ec5b41ff33f0fe14b4625f1278ac1e96fc788c70,6aadc793d51a566eeb6e27d6c9920b391aea2fcd11d6e8daf3fdd5a134ebadc3 |
|
||||
ffffffffffffffffdfffffffffffffffffffffffffffffffffffffffffffffff,0000000000000000000000002000000000000000000000000000000000010000,0000000000000000000000000000000000000000008000000000000000000000,6930fccbd9a040974abf210f12b71d4bc7b1a6205599b01a7275fb40e48ff9b3,76aea2e11be6f8d10f0b7d886e7f4a0f373ce7d61423cb419f2e6c667bb7c2b7 |
|
||||
ffffbfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,0000000001000000000000000000000000000000000000000000000000000000,0000000000000000000000000002000000000000200000000000000000000000,74a442bb61370af1730729961b35028382b3eeb39e0573154a3efa1c070c678f,78fd08e28198d547bcc2c45a11ede04548f874d3e04dc68032b09e1e7ac07a27 |
|
||||
fffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffff,0000100000000000000000000000000000000000000000000000000400000000,0020000000000000000000000000000000000000000000000000000000000000,da433d5e11ceccc0abc5c7626ce7bab42e89b221f785c409282de545f3fceb19,259f84d0b654ba1c18ddcbf8aad55fa078fb4de36e35b04d852ad9bab2f83d2d |
|
||||
fffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffff,0000000000000000000000000000000000000000000400000000000000000000,0000000000000000000000000000000000000000000000000002000000000000,01a575af9d4146753cf991196316995d2a6ee7aaad0f85ad57cd0f1f38a47ca9,2c0deb5fe3ad8d2884c945dde3f1672640701ad7e76f8e4a61756cfb84c099b9 |
|
||||
feffffffffffffffffffffffffffffffffffffffffffffffffffffefffffffff,0000000000000000000000000000000000000000000010000000000000000000,0000000000000000020000000000000000000000000000000000000000000000,2982dbbc5f366c9f78e29ebbecb1bb223deb5c4ee638b4583bd3a9af3149f8ef,2283d9d7435b2b3efae3c21f1e90917029b2cd77606d3fc7747c1b502755cf80 |
|
||||
fffffffffffffffffffffffffffffbffffffffffffffefffffffffffffffffff,0400000000000000000000000000000000000000000000000000000000000004,0000000000002000000000000000000000000000000000000000200000000000,6ee63ea24bf96b48c1dcc634e0c4da63933bb7fc4007d2c1c9052a59da1ef784,00d5bf0a0ffb48b9669307b7d0d0ba4344da7fc0009ba6dc1cc340a99340e268 |
|
||||
fffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffff,0000000000000000000000000000000000000000000000000000000000020000,fffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffff7,1caa0b6ff2dbb899765d585d1919fed59aa6e1f7b6522d0effc4784da9a3b588,1525ff8e4977fa40e76d0dc6d6b1dda187cb45365d4ce17da3170c426228c42e |
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffff,0000000000000010000000000000000000000000000000000000000000000000,fffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffff,3619c12fe8797042d5b1af5dab1fac333c7668ec610a381903c848737a0aa17b,68ac5650430e2defe17c66598dc37d7eccfd8a6e20d2669659c8f53bd82e0f49 |
|
||||
fffffffffffffffffeffffffffffffffffffffffffffffffffffffffffffffff,0000000000000000000000000000800000000000000000000000000000000000,ffffffffffffffffffdfffffffffffffffffffffffffffffffffffffffffffff,7ef66e831c709b43dc8813fa7bfb43af8b91df4ae2da15ba77622511a4ea6dc9,3b9b394c60ea620faee0489738c0f6149475c3629b6c9197e440abcc76189304 |
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff,0000000000000000000000000000000000000000040000000000000000000000,bfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,baf79fe5e5da980ebf5ed4b640d49d61412cf5ef5a46325a0a1e12f5e89c25be,088984e2a7a820f29566031f359ad1d8b50a22b275721188e93f911e3994c2fa |
|
||||
fffffdfffffffffffffff7ffffffffffffffffffffffffffffffffffffffffff,0000000000000000800000000000000000000000000000000000000000000001,ffffffffffffffffeffffffffffffffffffbffffffffffffffffffffffffffff,60a86d356ebb5cc87c76b5f51f22cc6fe21e11542315eb0dff95290fcc13be4a,4892fce22aaedaeea76423a3092ab54490eb08c04485dc82401e19a87b4a2b57 |
|
||||
ffffffffffffffdfffffffffffffffffffffffffffffffffffffffdfffffffff,0000004000000000000000000000000000000000000000000000000000000000,fffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffd,9f74fe097f475fb5d8c520696f3f780662062a1b1f581ce6a9d582046bf6e136,413dfc3e970dd476245b3a95936772eaf701016fb21a4f0589f5538921f28cd3 |
|
||||
ffffffffffffffffffffffffffffffffffffffffffffefffffffffffffffffff,0000000000000002000000000000000000000000000000000000000020000000,fffffffffffdffffffffffffffffffffffffffffffffffffffffffffffffffff,e847af346ccdaee0e6a5be84247d4173bdcdb84a9dcc3b8255648a26875b9574,47b3207e0cbaeccb9b895b498caf5fb431d56ae85b155b5cbee14707e7f73b52 |
|
||||
ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,0000000000000000000000000000000000000400000000000000000000000000,ffffffffffefffffffffffffffffffffffffffffffffffffffffffffffffffff,895b6bb2bb80fbd666567fd64d770d585242456151eb82b6722f88501e35cec3,1f820b0ac9122eb61383328bcf872c22b71c11d56ecac8157567ef19aa34aff4 |
|
||||
ffffffdfffffffffffffffffffffffffffffffffffffffffffffffffffffffff,ffffffffffffffffffffffffbfffffffffdfffffffffffffffffffffffffffff,986196cfec8389f4dd56997ef92b2e66ca09419b775a925af631ddc055e097ae,0a175062f62b8f2d2f2d8f198f7efade344979d91906570e7ef43acf83b8d1b3,58d8b481ff57402e5a3537d56308e13484634a3175a322557226dce5401ff4a9 |
|
||||
fffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffff,fffffffffffffffffffffffffffffffffffffffffffeffffffffff7fffffffff,6df6f0862887366019ac4bc3b720e8749d1280db08657e9f7fb101ae0254289b,b6dcc975a234fd07011e63e58fec2e87b618232fb35cbb82a5e9444f185f43e7,6613b047f370fe44adaf9bce3edbe0d51d43457fcd8f1055f0213246c2ad8a9a |
|
||||
f7ffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffff,ffffffffffffbfffffffffbfffffffffffffffffffffffffffffffffffffffff,69b79d171bf3236ab2db188199495cbf21a1601956aab0d37b267922bf9fe667,cf7c2809146f0c19a2af2e7bfee1c593a41d0c401dae909736601dc4e3fd619c,516ebd5c44683f1237e8346877f9acb6dfd574329d55f1a1d22a87c5b27e20ca |
|
||||
fffffffffffffffffffffffffffffffffffffeffffffffffffffffffffffffff,ffffffffffffffeffffffffffffffffffffffffffffffffffffffffff7ffffff,04bc0e13cc69d4587d5a1b572f17030a151d68efc861f57f8761c819eadff784,93e2e354ac1e4ce29c709f863d35a7e12fc6e9231bf0d3ad71e52ac888022425,5b6e6f478eb170f739bbf39dc830358501bb9713ca8ba2b0d85a368d1531030f |
|
||||
fffffdfffffffffffffffffffffffffffffffffffffeffffffffffffffffffff,ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffff,98ba487bcc026752ac462c2374935863bff0d769a848f18c57ce3cd8531c25dd,269ac8f0bff716170d3d14f383554b46f44f3ed056ac1a9cc36e886fa77359eb,5f1079964b19d1c74220f1f3ad87dc432a9fbc8676e8c85ca1280d79b4c07827 |
|
||||
ffffffffffffffffffffffffffffefffffffffffffffffffffffffffffffffff,ffffffffffffffffffffffffffefffffffffffffffffffffffffffffffffffff,819f13912cd98fb5cd88ba147bf3a2e866cd2963490867c2d6e467ad667ed259,04459c2736e3af31d63a72ff0b5e6be4dc7a2b6e308984cb2617d8cc73c206bd,1795d738fc382831d7292a0345db7d8416e0e5351110dae033100c1313477624 |
|
||||
fffffffffffdffffffffffffffffffffffffffffffffffffffffffffffffffff,fffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffff,252a571bde30ed43e92a748cfa69fae101fbf9d464d6a1772e5a62763ecc5f37,e6a307fd823c3dd433d19a40e33d291964ce04be2fa2677d4684d6f770f0775c,1cc4fb91c547eaf70b783e5d8ff893911b39da13b06bdd9ee168d4e9d659a007 |
|
||||
ffffffffffffffffffffffffffffffbfffffffffffffffffffffffffffffffff,ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbfff,7c013333741948937601cb418025f4686ed6872cef3b559759c4b25d55c0e71b,3006d971ac824e499e4e0aeae98f3b52f2666fe0cc60e0024d96f207d34f282e,6f5995da9e257426cdcae1f740f4ab002657d4582925c09a652088305956e9e3 |
|
||||
fffffffffffffffffffffdfffffffffffffffffffffffffffffbffffffffffff,ffffffffffffffffffffffdfffffffffbfffffffffffffffffffffffffffffff,0000000000000000010000000000000000000000000000000000000000000000,ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e,1354a9c87a1d30bea14670cfb8806afc8a5331e4e9a79a23e5c806ae10e4f20d |
|
||||
fffffffffffffffffffffffffdffffffffffffffffffffffffffffffffffffff,fffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffff,0000000000000000000000000000000000000000000000000040000000000000,374deeae22c93f955cb83ad2071f7e2256f6e109cad7bca6d71dc7b24414bb36,58107a072768011c332eaf4ba8105e034c78331c88bdf95dc4aac0d266c7be82 |
|
||||
ffffffffefffffffffffffffffff7fffffffffffffffffffffffffffffffffff,fffffffffffffefffffffffffffffffffffffeffffffffffffffffffffffffff,0000000000000000000000000000000000000000000000000000020000000000,4d000b621adb87e1c53261af9db2e179141ecae0b331a1870aa4040aee752b08,02b1ddcb5907bc8dc23ea21ec4ca8ed451fd2d401e1fdafa168e78f0edb56132 |
|
||||
fffffffffffffffffffffffdffffffefffffffffffffffffffffffffffffffff,ffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffff,0000008000000000000000000000000000000000000100000000000000000000,1e5f4502069439739887372daf147d890793cc414df76cfc3cbf176a14a1f857,269178d7feddd5ccad44afe27a8f0a9ff516308610148780f60fd266739f0162 |
|
||||
ffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffbffff,ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fff,0000000000000004000000000000000000000000000000000000000000000000,129e53ac428e9cbb7e10955e56c5fc69fefdff56963e7caf054e9e0c90ae86f9,5ccc8a10748268375a15d5307417acb93cc6b33ebb52107a29daab02e76ea1ed |
|
||||
fffffffffffffffffffffffffffffffffffffffffffffffdffffffffffffffff,ffffffffffffffffffffffffffffffffffffffffffffffffffefffffffffffff,0100000000000000000000000000000000000000000000000000000000000000,8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa,218fda0b4a63abef45403858841323a0ff4f1f076a4d43f3104bb5c603a978e4 |
|
||||
ffffffffffffffffffffffffffffffffffffffffffffefffffffffffffffffff,fffffffffffffffffffffffffffffffffffffffffbfffffffffffffffffffdff,0000000000000000000000000000000020000000000000000000000000000000,7e2cd40ef8c94077f44b1d1548425e3d7e125be646707bad2818b0eda7dc0151,330c1c4a693063bcb83d160a3b462b657e48c8e67234ace9a31538e4d80f0340 |
|
||||
ffffffffffffffffffffffffffffffffffffffffffdfffffffffffffffffffff,fffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffff,0000000000000000000000000001000000000000000000000000000000000000,b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef,45aeef0f37fb710d53cb44ed8be70f128f112d5724d3d86f37d4122d5d13f736 |
|
||||
fffffffffffbffffffffffffffffffffffffffffffffffffffffffffffffffff,fffffffffffffffffffffffffffbffffffffffffffffffffffffffffffffffff,fffffffffffffffffdffffffffffffffffffffffffffffffffffffffffffffff,86fe5d6a44b34e0099868db1852f147516009ab43022ad641b8f273f845b90d9,12a2f435dccedb20ee5a7cbb22cbe2c905e856f9eb2aa45f3b3879bc4341e21a |
|
||||
fffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffffff,fffffffffffffffffffffffffffffffffffffdffffffffffffffffffffffffff,ffffffffffffffffffffffffffefffffffffffffffffffffffffffffffffffff,49aa8388e578e3f24abac451d26513ebdb7fbe70d0da925ff4300455b37dfde9,370a8d653a80e9178bd1b6493fc887455272575b24deede57c3b6cb623229ae3 |
|
||||
ffffffffffffffffffffffffffffffffffffefffffffffffffffffffffffffff,ffffffffffffffffbfffffffffffffffffffffffffffffffffffffffffffffff,ffffffffffffffffffffffffffdfffffffffffffffffffffffffffffffffffff,b5f35f078c6b1119278dd516b386efc199484016ec7dca76d89bdb417688447b,0896c1df1fd0ad1834948085e08fbd4694ae20a3daaef0320596d8ae19fa4f35 |
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffdfffffffffff,ffffffffffffffffffffffffffffffffffefffffffffffffffffffffffffffff,ffbfffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffff,91c3f6b39e833d4e6c8c2c08081fd9ed9563d13a658a598eeacbf7e0acc6a715,699119f3012191c8bc146928ad6a891b0a635faa99c61b6ae54c1793c619e07d |
|
||||
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffff,fffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffff,fffffffdffffffffffffffffffffffffffffffffffffffffffffffffffffffff,78d6e4ebce682bc53f26487a0a004aa1ff9c593b865901c07b77580403188270,22ad2a2bda0bff6f55b68d3350d36cd101eb9e623c1390ca919e3698a525ec4a |
|
||||
fffbffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,fffffffffffffffffffffffffffffffffffffffffffffffffffffeffffefffff,ffffffffefffffffffffffffffffffffffffffffffffffffffffffffffffffff,42fd2c487f7509ce6d570d18df9e43677f4d1d57596e3c82c287acf6b9e64a25,09509fe9194d7485139748d2dfe323eb3112bcf7cc347949a0576fbf686b7a05 |
|
||||
ffffffeffffffffffffffffffffffffbffffffffffffffffffffffffffffffff,ffdffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffff,ffffffffffffffffffffefffffffffffffffffffffffffffffffffffffffffff,4e8b7198ffaad1dc059046d5f603bb5a4729885629f5d613f3124026bee11875,5b1041b8542a1c4c8cfe2d5f3cc75524b986260050dbd9efd1b365a7e0d22c62 |
|
||||
fffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffff,ffffffffffffffffffffffffffffffffffffffffffffffffffffffbfffffffff,ffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,e8b6b147dcda9d145608c505212746b5c107e9693d1b6c6e14f4e98dab75ccc3,6ff3740592fd8057a0e6bcf7f052d806732e1217caa1fd0acf48f9aaec187a05 |
|
@ -1,265 +0,0 @@ |
|||||
# Format: HMAC_SHA_TYPE,PASSWORD,SALT,COST,RESULT |
|
||||
|
|
||||
# |
|
||||
# https://stackoverflow.com/questions/15593184/pbkdf2-hmac-sha-512-test-vectors |
|
||||
# |
|
||||
|
|
||||
# AW 1a 1iter 64outBytes 19pw 19sa |
|
||||
512,70617373444154416230304142375978445454,73616c744b4559626354635848434278746a44,1,CBE6088AD4359AF42E603C2A33760EF9D4017A7B2AAD10AF46F992C660A0B461ECB0DC2A79C2570941BEA6A08D15D6887E79F32B132E1C134E9525EEDDD744FA |
|
||||
# AW 1b 100000iter 64outBytes 19pw 19sa |
|
||||
512,70617373444154416230304142375978445454,73616c744b4559626354635848434278746a44,100000,ACCDCD8798AE5CD85804739015EF2A11E32591B7B7D16F76819B30B0D49D80E1ABEA6C9822B80A1FDFE421E26F5603ECA8A47A64C9A004FB5AF8229F762FF41F |
|
||||
# AW 2a 1iter 64outBytes 20pw 20sa |
|
||||
512,706173734441544162303041423759784454546c,73616c744b4559626354635848434278746a4432,1,8E5074A9513C1F1512C9B1DF1D8BFFA9D8B4EF9105DFC16681222839560FB63264BED6AABF761F180E912A66E0B53D65EC88F6A1519E14804EBA6DC9DF137007 |
|
||||
# AW 2b 100000iter 64outBytes 20pw 20sa |
|
||||
512,706173734441544162303041423759784454546c,73616c744b4559626354635848434278746a4432,100000,594256B0BD4D6C9F21A87F7BA5772A791A10E6110694F44365CD94670E57F1AECD797EF1D1001938719044C7F018026697845EB9AD97D97DE36AB8786AAB5096 |
|
||||
# AW 3a 1iter 64outBytes 21pw 21sa |
|
||||
512,706173734441544162303041423759784454546c52,73616c744b4559626354635848434278746a443250,1,A6AC8C048A7DFD7B838DA88F22C3FAB5BFF15D7CB8D83A62C6721A8FAF6903EAB6152CB7421026E36F2FFEF661EB4384DC276495C71B5CAB72E1C1A38712E56B |
|
||||
# AW 3b 100000iter 64outBytes 21pw 21sa |
|
||||
512,706173734441544162303041423759784454546c52,73616c744b4559626354635848434278746a443250,100000,94FFC2B1A390B7B8A9E6A44922C330DB2B193ADCF082EECD06057197F35931A9D0EC0EE5C660744B50B61F23119B847E658D179A914807F4B8AB8EB9505AF065 |
|
||||
# AW 4a 1iter 64outBytes 63pw 63sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c7474704535,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a65,1,E2CCC7827F1DD7C33041A98906A8FD7BAE1920A55FCB8F831683F14F1C3979351CB868717E5AB342D9A11ACF0B12D3283931D609B06602DA33F8377D1F1F9902 |
|
||||
# AW 4b 100000iter 64outBytes 63pw 63sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c7474704535,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a65,100000,07447401C85766E4AED583DE2E6BF5A675EABE4F3618281C95616F4FC1FDFE6ECBC1C3982789D4FD941D6584EF534A78BD37AE02555D9455E8F089FDB4DFB6BB |
|
||||
# AW 5a 1iter 64outBytes 64pw 64sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d,1,B029A551117FF36977F283F579DC7065B352266EA243BDD3F920F24D4D141ED8B6E02D96E2D3BDFB76F8D77BA8F4BB548996AD85BB6F11D01A015CE518F9A717 |
|
||||
# AW 5b 100000iter 64outBytes 64pw 64sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d,100000,31F5CC83ED0E948C05A15735D818703AAA7BFF3F09F5169CAF5DBA6602A05A4D5CFF5553D42E82E40516D6DC157B8DAEAE61D3FEA456D964CB2F7F9A63BBBDB5 |
|
||||
# AW 6a 1iter 64outBytes 65pw 65sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c74747045353755,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b,1,28B8A9F644D6800612197BB74DF460272E2276DE8CC07AC4897AC24DBC6EB77499FCAF97415244D9A29DA83FC347D09A5DBCFD6BD63FF6E410803DCA8A900AB6 |
|
||||
# AW 6b 100000iter 64outBytes 65pw 65sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c74747045353755,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b,100000,056BC9072A356B7D4DA60DD66F5968C2CAA375C0220EDA6B47EF8E8D105ED68B44185FE9003FBBA49E2C84240C9E8FD3F5B2F4F6512FD936450253DB37D10028 |
|
||||
# AW 7a 1iter 64outBytes 127pw 127sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b6275563661776930,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d70627879,1,16226C85E4F8D604573008BFE61C10B6947B53990450612DD4A3077F7DEE2116229E68EFD1DF6D73BD3C6D07567790EEA1E8B2AE9A1B046BE593847D9441A1B7 |
|
||||
# AW 7b 100000iter 64outBytes 127pw 127sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b6275563661776930,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d70627879,100000,70CF39F14C4CAF3C81FA288FB46C1DB52D19F72722F7BC84F040676D3371C89C11C50F69BCFBC3ACB0AB9E92E4EF622727A916219554B2FA121BEDDA97FF3332 |
|
||||
# AW 8a 1iter 64outBytes 128pw 128sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936,1,880C58C316D3A5B9F05977AB9C60C10ABEEBFAD5CE89CAE62905C1C4F80A0A098D82F95321A6220F8AECCFB45CE6107140899E8D655306AE6396553E2851376C |
|
||||
# AW 8b 100000iter 64outBytes 128pw 128sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936,100000,2668B71B3CA56136B5E87F30E098F6B4371CB5ED95537C7A073DAC30A2D5BE52756ADF5BB2F4320CB11C4E16B24965A9C790DEF0CBC62906920B4F2EB84D1D4A |
|
||||
# AW 9a 1iter 64outBytes 129pw 129sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b62755636617769303455,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d706278793650,1,93B9BA8283CC17D50EF3B44820828A258A996DE258225D24FB59990A6D0DE82DFB3FE2AC201952100E4CC8F06D883A9131419C0F6F5A6ECB8EC821545F14ADF1 |
|
||||
# AW 9b 100000iter 64outBytes 129pw 129sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b62755636617769303455,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d706278793650,100000,2575B485AFDF37C260B8F3386D33A60ED929993C9D48AC516EC66B87E06BE54ADE7E7C8CB3417C81603B080A8EEFC56072811129737CED96236B9364E22CE3A5 |
|
||||
# AW 10a 1iter 64outBytes 1025pw 1025sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034557a3365624541687a5a347665314132776735436e4c58645a4335593767776656676245675a53546d6f5951537a43354f57346466726a71697741705441434f36786f4f4c31416a576a3658366636714666463854566d4f7a553952684f64314e3451747a574934665036465974744e7a3546754c6474595658575658483254663749396669654d65574348544d6b4d3456636d5179514870626350384d45623566316736436b6735786b3348517233774d427651634f4870435079314b3848434d376135776b5044686756413042566d774e707352496244515a5274484b36645436624779616c70366762465a427542487744383667547a6b72465937486b4f5672676330674a63474a5a65363543653876344a6e354f7a6b75567369553865666d32507732526e62705753417237536b56644377584b3258534a445135665a344842457a395654465972473233454c754c6a7678356e6a4f4c4e6744414a7566354a4232746e346e4d6a6a636e6c31653871635956775a71467a4576327a684c7944574d6b5634747a6c3461734c6e7679417854426b7850525a6a3270524142577762336b456f6670734859784d54416e33385953705a72656f5869705a57426e7536484455526172755861495059465059486c394c73397773754437727a614766624f796656674c49474b35724f447068775241376c6d383862474b5938623774574f746570794576614c784d4937475a4635536377705a54596545444e554b507a764d32496d397a656849617a6e7067754e644e584e4d4c576e7750753448367a4576616a6b7733473375635369584b6d6836584e6533686b6453414e6d33766e787a52586d346663757a4178363849456c584532626b4746456c6c75444c6f3645735544575a344a4957425661447759644a78387543586251646f69667a4373356b7575436c614461447149686235684a325752386d78697565467353306144476449596d79653573766d4e6d7a5178466d644f6b486f463743667775553179793475454574397650535032774670316479614d764a573638767442346b64644c6d493667496756566354365a5831516d36577375735072646973504c423253636f64586f6a43624c33444c6a36504b47385144564d5754724c3154706166543277736c526c656457496873546c76326d493343303636574d635453774b4c58644544685676464a365368694c4b534e37676e52726c4530426e4177,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936506c4264494c424f6b4b554236544754504a5868317470644f485447364b754976636251703971576a6166317578414b676954745952494868786a4a4932766956613666445a3637514f6f754f6166325258516870735761547441566e66663650494663764a68645044464756356e766d5a576f435a516f646a36795852444850773950794630694c596d3975467445756e6c41417847423571716561345835745a7642314f664c5677796d593361334a506a64785464764878434862717145307a697036314a4e71646d65577847746c5242433643476f4369484f34587848436e745142524a446347307a57376a6f5464677454426172735151686c4c5842474d4e42534e6d6d546244663368467461775542434a483138494169524d777965514a624a326245527359334d5652507559436634417537674e3732694768316c526b745351744546796537704f34366b4d585272456a48515758496e4d7a7a79375832537458557a48565446463256644f6f4b6e30575571464e7642365046377149734f6c594b6a3537626931507361333473383557784d5362546b68726437564864485a6b545661576472616f6858594f65506465457649774f62434745586b4554557a714d355032797a6f424f4a53646a7049596161387a7a644c4433797262315477435a754a567873727130585859367645725534516e74735730393732586d474e79756d464e4a69506d344f4e4b6831524c7653316b646459336e6d3832373653345455755a667252514f3851785a524e7553615a49384a525a7035566f6a4235446b74754d7841516b716f506a5135567462366f58654f79593539314342314d455731664c544373304e724c33323153614e524d717a613145546f67417870456959775a367049676e4d6d53714e4d52645a6e43714134674d5777316c49564154574b38334f436569634e52554e4f64667a5337413876624c636d764b5074704f4676684e7a77727255646b76754b7661594a76695167655237736e4765744f394a4c4377496c48496a3532674d434e553138643332534a6c37586f6d746c337749653032534d767131693142636158376c58696f7157476d6756714257553366735575477748693652554b43435164454f42664e6f32576470466143666c63676e6e304f366a564843716b763863516b3831417153303072416d4847434e547779413654713554586f4c6c446e43386741516a4455735a70307a,1,384BCD6914407E40C295D1037CF4F990E8F0E720AF43CB706683177016D36D1A14B3A7CF22B5DF8D5D7D44D69610B64251ADE2E7AB54A3813A89935592E391BF |
|
||||
# AW 10b 100000iter 64outBytes 1025pw 1025sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034557a3365624541687a5a347665314132776735436e4c58645a4335593767776656676245675a53546d6f5951537a43354f57346466726a71697741705441434f36786f4f4c31416a576a3658366636714666463854566d4f7a553952684f64314e3451747a574934665036465974744e7a3546754c6474595658575658483254663749396669654d65574348544d6b4d3456636d5179514870626350384d45623566316736436b6735786b3348517233774d427651634f4870435079314b3848434d376135776b5044686756413042566d774e707352496244515a5274484b36645436624779616c70366762465a427542487744383667547a6b72465937486b4f5672676330674a63474a5a65363543653876344a6e354f7a6b75567369553865666d32507732526e62705753417237536b56644377584b3258534a445135665a344842457a395654465972473233454c754c6a7678356e6a4f4c4e6744414a7566354a4232746e346e4d6a6a636e6c31653871635956775a71467a4576327a684c7944574d6b5634747a6c3461734c6e7679417854426b7850525a6a3270524142577762336b456f6670734859784d54416e33385953705a72656f5869705a57426e7536484455526172755861495059465059486c394c73397773754437727a614766624f796656674c49474b35724f447068775241376c6d383862474b5938623774574f746570794576614c784d4937475a4635536377705a54596545444e554b507a764d32496d397a656849617a6e7067754e644e584e4d4c576e7750753448367a4576616a6b7733473375635369584b6d6836584e6533686b6453414e6d33766e787a52586d346663757a4178363849456c584532626b4746456c6c75444c6f3645735544575a344a4957425661447759644a78387543586251646f69667a4373356b7575436c614461447149686235684a325752386d78697565467353306144476449596d79653573766d4e6d7a5178466d644f6b486f463743667775553179793475454574397650535032774670316479614d764a573638767442346b64644c6d493667496756566354365a5831516d36577375735072646973504c423253636f64586f6a43624c33444c6a36504b47385144564d5754724c3154706166543277736c526c656457496873546c76326d493343303636574d635453774b4c58644544685676464a365368694c4b534e37676e52726c4530426e4177,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936506c4264494c424f6b4b554236544754504a5868317470644f485447364b754976636251703971576a6166317578414b676954745952494868786a4a4932766956613666445a3637514f6f754f6166325258516870735761547441566e66663650494663764a68645044464756356e766d5a576f435a516f646a36795852444850773950794630694c596d3975467445756e6c41417847423571716561345835745a7642314f664c5677796d593361334a506a64785464764878434862717145307a697036314a4e71646d65577847746c5242433643476f4369484f34587848436e745142524a446347307a57376a6f5464677454426172735151686c4c5842474d4e42534e6d6d546244663368467461775542434a483138494169524d777965514a624a326245527359334d5652507559436634417537674e3732694768316c526b745351744546796537704f34366b4d585272456a48515758496e4d7a7a79375832537458557a48565446463256644f6f4b6e30575571464e7642365046377149734f6c594b6a3537626931507361333473383557784d5362546b68726437564864485a6b545661576472616f6858594f65506465457649774f62434745586b4554557a714d355032797a6f424f4a53646a7049596161387a7a644c4433797262315477435a754a567873727130585859367645725534516e74735730393732586d474e79756d464e4a69506d344f4e4b6831524c7653316b646459336e6d3832373653345455755a667252514f3851785a524e7553615a49384a525a7035566f6a4235446b74754d7841516b716f506a5135567462366f58654f79593539314342314d455731664c544373304e724c33323153614e524d717a613145546f67417870456959775a367049676e4d6d53714e4d52645a6e43714134674d5777316c49564154574b38334f436569634e52554e4f64667a5337413876624c636d764b5074704f4676684e7a77727255646b76754b7661594a76695167655237736e4765744f394a4c4377496c48496a3532674d434e553138643332534a6c37586f6d746c337749653032534d767131693142636158376c58696f7157476d6756714257553366735575477748693652554b43435164454f42664e6f32576470466143666c63676e6e304f366a564843716b763863516b3831417153303072416d4847434e547779413654713554586f4c6c446e43386741516a4455735a70307a,100000,B8674F6C0CC9F8CF1F1874534FD5AF01FC1504D76C2BC2AA0A75FE4DD5DFD1DAF60EA7C85F122BCEEB8772659D601231607726998EAC3F6AAB72EFF7BA349F7F |
|
||||
# AW Trunc 1a 1iter 63outBytes 19pw 19sa |
|
||||
512,70617373444154416230304142375978445454,73616c744b4559626354635848434278746a44,1,CBE6088AD4359AF42E603C2A33760EF9D4017A7B2AAD10AF46F992C660A0B461ECB0DC2A79C2570941BEA6A08D15D6887E79F32B132E1C134E9525EEDDD744 |
|
||||
# AW Trunc 1b 100000iter 63outBytes 19pw 19sa |
|
||||
512,70617373444154416230304142375978445454,73616c744b4559626354635848434278746a44,100000,ACCDCD8798AE5CD85804739015EF2A11E32591B7B7D16F76819B30B0D49D80E1ABEA6C9822B80A1FDFE421E26F5603ECA8A47A64C9A004FB5AF8229F762FF4 |
|
||||
# AW Trunc 2a 1iter 63outBytes 20pw 20sa |
|
||||
512,706173734441544162303041423759784454546c,73616c744b4559626354635848434278746a4432,1,8E5074A9513C1F1512C9B1DF1D8BFFA9D8B4EF9105DFC16681222839560FB63264BED6AABF761F180E912A66E0B53D65EC88F6A1519E14804EBA6DC9DF1370 |
|
||||
# AW Trunc 2b 100000iter 63outBytes 20pw 20sa |
|
||||
512,706173734441544162303041423759784454546c,73616c744b4559626354635848434278746a4432,100000,594256B0BD4D6C9F21A87F7BA5772A791A10E6110694F44365CD94670E57F1AECD797EF1D1001938719044C7F018026697845EB9AD97D97DE36AB8786AAB50 |
|
||||
# AW Trunc 3a 1iter 63outBytes 21pw 21sa |
|
||||
512,706173734441544162303041423759784454546c52,73616c744b4559626354635848434278746a443250,1,A6AC8C048A7DFD7B838DA88F22C3FAB5BFF15D7CB8D83A62C6721A8FAF6903EAB6152CB7421026E36F2FFEF661EB4384DC276495C71B5CAB72E1C1A38712E5 |
|
||||
# AW Trunc 3b 100000iter 63outBytes 21pw 21sa |
|
||||
512,706173734441544162303041423759784454546c52,73616c744b4559626354635848434278746a443250,100000,94FFC2B1A390B7B8A9E6A44922C330DB2B193ADCF082EECD06057197F35931A9D0EC0EE5C660744B50B61F23119B847E658D179A914807F4B8AB8EB9505AF0 |
|
||||
# AW Trunc 4a 1iter 63outBytes 63pw 63sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c7474704535,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a65,1,E2CCC7827F1DD7C33041A98906A8FD7BAE1920A55FCB8F831683F14F1C3979351CB868717E5AB342D9A11ACF0B12D3283931D609B06602DA33F8377D1F1F99 |
|
||||
# AW Trunc 4b 100000iter 63outBytes 63pw 63sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c7474704535,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a65,100000,07447401C85766E4AED583DE2E6BF5A675EABE4F3618281C95616F4FC1FDFE6ECBC1C3982789D4FD941D6584EF534A78BD37AE02555D9455E8F089FDB4DFB6 |
|
||||
# AW Trunc 5a 1iter 63outBytes 64pw 64sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d,1,B029A551117FF36977F283F579DC7065B352266EA243BDD3F920F24D4D141ED8B6E02D96E2D3BDFB76F8D77BA8F4BB548996AD85BB6F11D01A015CE518F9A7 |
|
||||
# AW Trunc 5b 100000iter 63outBytes 64pw 64sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d,100000,31F5CC83ED0E948C05A15735D818703AAA7BFF3F09F5169CAF5DBA6602A05A4D5CFF5553D42E82E40516D6DC157B8DAEAE61D3FEA456D964CB2F7F9A63BBBD |
|
||||
# AW Trunc 6a 1iter 63outBytes 65pw 65sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c74747045353755,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b,1,28B8A9F644D6800612197BB74DF460272E2276DE8CC07AC4897AC24DBC6EB77499FCAF97415244D9A29DA83FC347D09A5DBCFD6BD63FF6E410803DCA8A900A |
|
||||
# AW Trunc 6b 100000iter 63outBytes 65pw 65sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c74747045353755,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b,100000,056BC9072A356B7D4DA60DD66F5968C2CAA375C0220EDA6B47EF8E8D105ED68B44185FE9003FBBA49E2C84240C9E8FD3F5B2F4F6512FD936450253DB37D100 |
|
||||
# AW Trunc 7a 1iter 63outBytes 127pw 127sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b6275563661776930,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d70627879,1,16226C85E4F8D604573008BFE61C10B6947B53990450612DD4A3077F7DEE2116229E68EFD1DF6D73BD3C6D07567790EEA1E8B2AE9A1B046BE593847D9441A1 |
|
||||
# AW Trunc 7b 100000iter 63outBytes 127pw 127sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b6275563661776930,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d70627879,100000,70CF39F14C4CAF3C81FA288FB46C1DB52D19F72722F7BC84F040676D3371C89C11C50F69BCFBC3ACB0AB9E92E4EF622727A916219554B2FA121BEDDA97FF33 |
|
||||
# AW Trunc 7a 1iter 63outBytes 128pw 128sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936,1,880C58C316D3A5B9F05977AB9C60C10ABEEBFAD5CE89CAE62905C1C4F80A0A098D82F95321A6220F8AECCFB45CE6107140899E8D655306AE6396553E285137 |
|
||||
# AW Trunc 8b 100000iter 63outBytes 128pw 128sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936,100000,2668B71B3CA56136B5E87F30E098F6B4371CB5ED95537C7A073DAC30A2D5BE52756ADF5BB2F4320CB11C4E16B24965A9C790DEF0CBC62906920B4F2EB84D1D |
|
||||
# AW Trunc 9a 1iter 63outBytes 129pw 129sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b62755636617769303455,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d706278793650,1,93B9BA8283CC17D50EF3B44820828A258A996DE258225D24FB59990A6D0DE82DFB3FE2AC201952100E4CC8F06D883A9131419C0F6F5A6ECB8EC821545F14AD |
|
||||
# AW Trunc 9b 100000iter 63outBytes 129pw 129sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b62755636617769303455,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d706278793650,100000,2575B485AFDF37C260B8F3386D33A60ED929993C9D48AC516EC66B87E06BE54ADE7E7C8CB3417C81603B080A8EEFC56072811129737CED96236B9364E22CE3 |
|
||||
# AW Trunc 10b 100000iter 63outBytes 1025pw 1025sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034557a3365624541687a5a347665314132776735436e4c58645a4335593767776656676245675a53546d6f5951537a43354f57346466726a71697741705441434f36786f4f4c31416a576a3658366636714666463854566d4f7a553952684f64314e3451747a574934665036465974744e7a3546754c6474595658575658483254663749396669654d65574348544d6b4d3456636d5179514870626350384d45623566316736436b6735786b3348517233774d427651634f4870435079314b3848434d376135776b5044686756413042566d774e707352496244515a5274484b36645436624779616c70366762465a427542487744383667547a6b72465937486b4f5672676330674a63474a5a65363543653876344a6e354f7a6b75567369553865666d32507732526e62705753417237536b56644377584b3258534a445135665a344842457a395654465972473233454c754c6a7678356e6a4f4c4e6744414a7566354a4232746e346e4d6a6a636e6c31653871635956775a71467a4576327a684c7944574d6b5634747a6c3461734c6e7679417854426b7850525a6a3270524142577762336b456f6670734859784d54416e33385953705a72656f5869705a57426e7536484455526172755861495059465059486c394c73397773754437727a614766624f796656674c49474b35724f447068775241376c6d383862474b5938623774574f746570794576614c784d4937475a4635536377705a54596545444e554b507a764d32496d397a656849617a6e7067754e644e584e4d4c576e7750753448367a4576616a6b7733473375635369584b6d6836584e6533686b6453414e6d33766e787a52586d346663757a4178363849456c584532626b4746456c6c75444c6f3645735544575a344a4957425661447759644a78387543586251646f69667a4373356b7575436c614461447149686235684a325752386d78697565467353306144476449596d79653573766d4e6d7a5178466d644f6b486f463743667775553179793475454574397650535032774670316479614d764a573638767442346b64644c6d493667496756566354365a5831516d36577375735072646973504c423253636f64586f6a43624c33444c6a36504b47385144564d5754724c3154706166543277736c526c656457496873546c76326d493343303636574d635453774b4c58644544685676464a365368694c4b534e37676e52726c4530426e4177,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936506c4264494c424f6b4b554236544754504a5868317470644f485447364b754976636251703971576a6166317578414b676954745952494868786a4a4932766956613666445a3637514f6f754f6166325258516870735761547441566e66663650494663764a68645044464756356e766d5a576f435a516f646a36795852444850773950794630694c596d3975467445756e6c41417847423571716561345835745a7642314f664c5677796d593361334a506a64785464764878434862717145307a697036314a4e71646d65577847746c5242433643476f4369484f34587848436e745142524a446347307a57376a6f5464677454426172735151686c4c5842474d4e42534e6d6d546244663368467461775542434a483138494169524d777965514a624a326245527359334d5652507559436634417537674e3732694768316c526b745351744546796537704f34366b4d585272456a48515758496e4d7a7a79375832537458557a48565446463256644f6f4b6e30575571464e7642365046377149734f6c594b6a3537626931507361333473383557784d5362546b68726437564864485a6b545661576472616f6858594f65506465457649774f62434745586b4554557a714d355032797a6f424f4a53646a7049596161387a7a644c4433797262315477435a754a567873727130585859367645725534516e74735730393732586d474e79756d464e4a69506d344f4e4b6831524c7653316b646459336e6d3832373653345455755a667252514f3851785a524e7553615a49384a525a7035566f6a4235446b74754d7841516b716f506a5135567462366f58654f79593539314342314d455731664c544373304e724c33323153614e524d717a613145546f67417870456959775a367049676e4d6d53714e4d52645a6e43714134674d5777316c49564154574b38334f436569634e52554e4f64667a5337413876624c636d764b5074704f4676684e7a77727255646b76754b7661594a76695167655237736e4765744f394a4c4377496c48496a3532674d434e553138643332534a6c37586f6d746c337749653032534d767131693142636158376c58696f7157476d6756714257553366735575477748693652554b43435164454f42664e6f32576470466143666c63676e6e304f366a564843716b763863516b3831417153303072416d4847434e547779413654713554586f4c6c446e43386741516a4455735a70307a,100000,B8674F6C0CC9F8CF1F1874534FD5AF01FC1504D76C2BC2AA0A75FE4DD5DFD1DAF60EA7C85F122BCEEB8772659D601231607726998EAC3F6AAB72EFF7BA349F |
|
||||
# AW Ext 1a 1iter 65outBytes 19pw 19sa |
|
||||
512,70617373444154416230304142375978445454,73616c744b4559626354635848434278746a44,1,CBE6088AD4359AF42E603C2A33760EF9D4017A7B2AAD10AF46F992C660A0B461ECB0DC2A79C2570941BEA6A08D15D6887E79F32B132E1C134E9525EEDDD744FA88 |
|
||||
# AW Ext 1b 100000iter 65outBytes 19pw 19sa |
|
||||
512,70617373444154416230304142375978445454,73616c744b4559626354635848434278746a44,100000,ACCDCD8798AE5CD85804739015EF2A11E32591B7B7D16F76819B30B0D49D80E1ABEA6C9822B80A1FDFE421E26F5603ECA8A47A64C9A004FB5AF8229F762FF41F7C |
|
||||
# AW Ext 2a 1iter 65outBytes 20pw 20sa |
|
||||
512,706173734441544162303041423759784454546c,73616c744b4559626354635848434278746a4432,1,8E5074A9513C1F1512C9B1DF1D8BFFA9D8B4EF9105DFC16681222839560FB63264BED6AABF761F180E912A66E0B53D65EC88F6A1519E14804EBA6DC9DF1370070B |
|
||||
# AW Ext 2b 100000iter 65outBytes 20pw 20sa |
|
||||
512,706173734441544162303041423759784454546c,73616c744b4559626354635848434278746a4432,100000,594256B0BD4D6C9F21A87F7BA5772A791A10E6110694F44365CD94670E57F1AECD797EF1D1001938719044C7F018026697845EB9AD97D97DE36AB8786AAB5096E7 |
|
||||
# AW Ext 3a 1iter 65outBytes 21pw 21sa |
|
||||
512,706173734441544162303041423759784454546c52,73616c744b4559626354635848434278746a443250,1,A6AC8C048A7DFD7B838DA88F22C3FAB5BFF15D7CB8D83A62C6721A8FAF6903EAB6152CB7421026E36F2FFEF661EB4384DC276495C71B5CAB72E1C1A38712E56B93 |
|
||||
# AW Ext 3b 100000iter 65outBytes 21pw 21sa |
|
||||
512,706173734441544162303041423759784454546c52,73616c744b4559626354635848434278746a443250,100000,94FFC2B1A390B7B8A9E6A44922C330DB2B193ADCF082EECD06057197F35931A9D0EC0EE5C660744B50B61F23119B847E658D179A914807F4B8AB8EB9505AF06526 |
|
||||
# AW Ext 4a 1iter 65outBytes 63pw 63sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c7474704535,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a65,1,E2CCC7827F1DD7C33041A98906A8FD7BAE1920A55FCB8F831683F14F1C3979351CB868717E5AB342D9A11ACF0B12D3283931D609B06602DA33F8377D1F1F9902DA |
|
||||
# AW Ext 4b 100000iter 65outBytes 63pw 63sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c7474704535,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a65,100000,07447401C85766E4AED583DE2E6BF5A675EABE4F3618281C95616F4FC1FDFE6ECBC1C3982789D4FD941D6584EF534A78BD37AE02555D9455E8F089FDB4DFB6BB30 |
|
||||
# AW Ext 5a 1iter 65outBytes 64pw 64sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d,1,B029A551117FF36977F283F579DC7065B352266EA243BDD3F920F24D4D141ED8B6E02D96E2D3BDFB76F8D77BA8F4BB548996AD85BB6F11D01A015CE518F9A71780 |
|
||||
# AW Ext 5b 100000iter 65outBytes 64pw 64sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d,100000,31F5CC83ED0E948C05A15735D818703AAA7BFF3F09F5169CAF5DBA6602A05A4D5CFF5553D42E82E40516D6DC157B8DAEAE61D3FEA456D964CB2F7F9A63BBBDB59F |
|
||||
# AW Ext 6a 1iter 65outBytes 65pw 65sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c74747045353755,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b,1,28B8A9F644D6800612197BB74DF460272E2276DE8CC07AC4897AC24DBC6EB77499FCAF97415244D9A29DA83FC347D09A5DBCFD6BD63FF6E410803DCA8A900AB671 |
|
||||
# AW Ext 6b 100000iter 65outBytes 65pw 65sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c74747045353755,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b,100000,056BC9072A356B7D4DA60DD66F5968C2CAA375C0220EDA6B47EF8E8D105ED68B44185FE9003FBBA49E2C84240C9E8FD3F5B2F4F6512FD936450253DB37D1002889 |
|
||||
# AW Ext 7a 1iter 65outBytes 127pw 127sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b6275563661776930,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d70627879,1,16226C85E4F8D604573008BFE61C10B6947B53990450612DD4A3077F7DEE2116229E68EFD1DF6D73BD3C6D07567790EEA1E8B2AE9A1B046BE593847D9441A1B766 |
|
||||
# AW Ext 7b 100000iter 65outBytes 127pw 127sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b6275563661776930,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d70627879,100000,70CF39F14C4CAF3C81FA288FB46C1DB52D19F72722F7BC84F040676D3371C89C11C50F69BCFBC3ACB0AB9E92E4EF622727A916219554B2FA121BEDDA97FF3332EC |
|
||||
# AW Ext 8a 1iter 65outBytes 128pw 128sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936,1,880C58C316D3A5B9F05977AB9C60C10ABEEBFAD5CE89CAE62905C1C4F80A0A098D82F95321A6220F8AECCFB45CE6107140899E8D655306AE6396553E2851376C57 |
|
||||
# AW Ext 8b 100000iter 65outBytes 128pw 128sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936,100000,2668B71B3CA56136B5E87F30E098F6B4371CB5ED95537C7A073DAC30A2D5BE52756ADF5BB2F4320CB11C4E16B24965A9C790DEF0CBC62906920B4F2EB84D1D4A30 |
|
||||
# AW Ext 9a 1iter 65outBytes 129pw 129sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b62755636617769303455,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d706278793650,1,93B9BA8283CC17D50EF3B44820828A258A996DE258225D24FB59990A6D0DE82DFB3FE2AC201952100E4CC8F06D883A9131419C0F6F5A6ECB8EC821545F14ADF199 |
|
||||
# AW Ext 9b 100000iter 65outBytes 129pw 129sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b62755636617769303455,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d706278793650,100000,2575B485AFDF37C260B8F3386D33A60ED929993C9D48AC516EC66B87E06BE54ADE7E7C8CB3417C81603B080A8EEFC56072811129737CED96236B9364E22CE3A542 |
|
||||
# AW Ext 10a 1iter 65outBytes 1025pw 1025sa |
|
||||
512,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034557a3365624541687a5a347665314132776735436e4c58645a4335593767776656676245675a53546d6f5951537a43354f57346466726a71697741705441434f36786f4f4c31416a576a3658366636714666463854566d4f7a553952684f64314e3451747a574934665036465974744e7a3546754c6474595658575658483254663749396669654d65574348544d6b4d3456636d5179514870626350384d45623566316736436b6735786b3348517233774d427651634f4870435079314b3848434d376135776b5044686756413042566d774e707352496244515a5274484b36645436624779616c70366762465a427542487744383667547a6b72465937486b4f5672676330674a63474a5a65363543653876344a6e354f7a6b75567369553865666d32507732526e62705753417237536b56644377584b3258534a445135665a344842457a395654465972473233454c754c6a7678356e6a4f4c4e6744414a7566354a4232746e346e4d6a6a636e6c31653871635956775a71467a4576327a684c7944574d6b5634747a6c3461734c6e7679417854426b7850525a6a3270524142577762336b456f6670734859784d54416e33385953705a72656f5869705a57426e7536484455526172755861495059465059486c394c73397773754437727a614766624f796656674c49474b35724f447068775241376c6d383862474b5938623774574f746570794576614c784d4937475a4635536377705a54596545444e554b507a764d32496d397a656849617a6e7067754e644e584e4d4c576e7750753448367a4576616a6b7733473375635369584b6d6836584e6533686b6453414e6d33766e787a52586d346663757a4178363849456c584532626b4746456c6c75444c6f3645735544575a344a4957425661447759644a78387543586251646f69667a4373356b7575436c614461447149686235684a325752386d78697565467353306144476449596d79653573766d4e6d7a5178466d644f6b486f463743667775553179793475454574397650535032774670316479614d764a573638767442346b64644c6d493667496756566354365a5831516d36577375735072646973504c423253636f64586f6a43624c33444c6a36504b47385144564d5754724c3154706166543277736c526c656457496873546c76326d493343303636574d635453774b4c58644544685676464a365368694c4b534e37676e52726c4530426e4177,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936506c4264494c424f6b4b554236544754504a5868317470644f485447364b754976636251703971576a6166317578414b676954745952494868786a4a4932766956613666445a3637514f6f754f6166325258516870735761547441566e66663650494663764a68645044464756356e766d5a576f435a516f646a36795852444850773950794630694c596d3975467445756e6c41417847423571716561345835745a7642314f664c5677796d593361334a506a64785464764878434862717145307a697036314a4e71646d65577847746c5242433643476f4369484f34587848436e745142524a446347307a57376a6f5464677454426172735151686c4c5842474d4e42534e6d6d546244663368467461775542434a483138494169524d777965514a624a326245527359334d5652507559436634417537674e3732694768316c526b745351744546796537704f34366b4d585272456a48515758496e4d7a7a79375832537458557a48565446463256644f6f4b6e30575571464e7642365046377149734f6c594b6a3537626931507361333473383557784d5362546b68726437564864485a6b545661576472616f6858594f65506465457649774f62434745586b4554557a714d355032797a6f424f4a53646a7049596161387a7a644c4433797262315477435a754a567873727130585859367645725534516e74735730393732586d474e79756d464e4a69506d344f4e4b6831524c7653316b646459336e6d3832373653345455755a667252514f3851785a524e7553615a49384a525a7035566f6a4235446b74754d7841516b716f506a5135567462366f58654f79593539314342314d455731664c544373304e724c33323153614e524d717a613145546f67417870456959775a367049676e4d6d53714e4d52645a6e43714134674d5777316c49564154574b38334f436569634e52554e4f64667a5337413876624c636d764b5074704f4676684e7a77727255646b76754b7661594a76695167655237736e4765744f394a4c4377496c48496a3532674d434e553138643332534a6c37586f6d746c337749653032534d767131693142636158376c58696f7157476d6756714257553366735575477748693652554b43435164454f42664e6f32576470466143666c63676e6e304f366a564843716b763863516b3831417153303072416d4847434e547779413654713554586f4c6c446e43386741516a4455735a70307a,1,384BCD6914407E40C295D1037CF4F990E8F0E720AF43CB706683177016D36D1A14B3A7CF22B5DF8D5D7D44D69610B64251ADE2E7AB54A3813A89935592E391BF91 |
|
||||
# AW Spl 1 16777216iter 7outBytes 8pw 9sa |
|
||||
512,7061737344415441,73616c744b45596263,16777216,AB96C76400D08B |
|
||||
# AW Spl 2 2097152iter 481outBytes 13pw 12sa |
|
||||
512,70617373444154416230304142,73616c744b45596263546358,2097152,C8CB4B4B498B32CDE191159866A8E86B4C9D84EF1D0A37CF7B9BDC7872EDD5F02242AA7D83172C778EF64C788D622ACBCD4317C4B63A2EDE184CB2A5F6B94815C395CC822D68C637ADB0E928C9692D32D6B66B3825CDB6AC9B57D9D15BCA72CC32773CA45350BB460F83172B75EDD418E2C39DF437FFFDDEF6FF5E83AFC2974E5B391303C80B73DA815E979118FB41ACC3E2019DB30C14650DC7E75D67A048541563A3ECA996CF15F9B3DD7C768B45613078CF772292F092CCFEC10F027669D60EDF56A383894F0EFD7DDC3551E1C6AA366F7EFB39981BF0BDF7894A83D051E900AF2FB81CA990F52EE613A5C2D28D28683E331F50BD10B6F8AF12705E505BCA3BB0D3869246863387DD385748718B3AAA51BA12BB067F1ABD6B8F2E0DECDA0A6693D1331349470E78212B2B4700709BC22C86AE7ADAB9C74635BC0E40A18BE604B8BE7ED1E0419258BB0C38D27264783FE2A915CD63C7CBB6C2D937803D86FFE9DC58132F2AF7642C782AF6A0D50AB47622A73EF16618E15B5CE8EEE9F5A1A477A02ADB5E95638792811013A9A8ACC9F618C4726DC26E67C1DDCE6E1E90594C94D4DE8FD8D89400AB3E8138089B4CD5893BD66691708D1C27FF7E69F12D1A15983352933DE1583A2127DC8B62E345C0B1CD14F9F7BC85FFBCEB40E80E84E8E8C0 |
|
||||
|
|
||||
# |
|
||||
# https://github.com/Anti-weakpasswords/PBKDF2-Test-Vectors/releases |
|
||||
# |
|
||||
|
|
||||
# AW 1a 1iter 32outBytes 31pw 31sa |
|
||||
256,706173734441544162303041423759784454546c5248326471784478313947,73616c744b4559626354635848434278746a4432506e426834344149513658,1,089314BCDFF35115C3240C0CEE274C114C7BC49FD498F853928A385528C9D9C3 |
|
||||
# AW 1b 100000iter 32outBytes 31pw 31sa |
|
||||
256,706173734441544162303041423759784454546c5248326471784478313947,73616c744b4559626354635848434278746a4432506e426834344149513658,100000,4A087BE50A80D23CAF4906010CEB7C9BCCBDDAE52380DD60B6DAFF4A2287CA41 |
|
||||
# AW 2a 1iter 32outBytes 32pw 32sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744,73616c744b4559626354635848434278746a4432506e42683434414951365855,1,806E79AEA28676B851B61D6D76E55DD49DC6781E50B76E2C1F32A2FFAEE91624 |
|
||||
# AW 2b 100000iter 32outBytes 32pw 32sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744,73616c744b4559626354635848434278746a4432506e42683434414951365855,100000,89D738B7AFACEC234157C84390C8357D34CCBF267C2DD14C8D357C4A459F5392 |
|
||||
# AW 3a 1iter 32outBytes 33pw 33sa |
|
||||
256,706173734441544162303041423759784454546c52483264717844783139474478,73616c744b4559626354635848434278746a4432506e426834344149513658554f,1,CCDE3C818E49B7CA1103A9C88597AC4B516E600F8084372901E1E88F56277FC5 |
|
||||
# AW 3b 100000iter 32outBytes 33pw 33sa |
|
||||
256,706173734441544162303041423759784454546c52483264717844783139474478,73616c744b4559626354635848434278746a4432506e426834344149513658554f,100000,8FEA43515B6669B32619916664D03A9547D667BBA4249499D80A0D53E379DC18 |
|
||||
# AW 4a 1iter 32outBytes 63pw 63sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c7474704535,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a65,1,3B28BF8995D81DDF78040C36D2E22C3B7C674BA05F91F11E3319BFB6FC8AC69E |
|
||||
# AW 4b 100000iter 32outBytes 63pw 63sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c7474704535,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a65,100000,DE166AF05815A27B3317662E72ECC139B262911F8790CCE62B5D10D9CF4BE3DC |
|
||||
# AW 5a 1iter 32outBytes 64pw 64sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d,1,43B34EC2B78FB5E1ABA41A5453F733C65B6604626D0F0C0BCC275CDC32F4717B |
|
||||
# AW 5b 100000iter 32outBytes 64pw 64sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d,100000,78CDCD1505BBF7AF1695173C147398BFBB57A774AA93F8F7A415F87A84C6C03B |
|
||||
# AW 6a 1iter 32outBytes 65pw 65sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c74747045353755,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b,1,57547F8DDB48E9F9926723050AFB0ADFA48F0FB8C0D7274448F55595FEBEC5EA |
|
||||
# AW 6b 100000iter 32outBytes 65pw 65sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c74747045353755,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b,100000,844E50F6F72A2EA3D5D23BF781DF0F8D3B89BF5D37D609F9B87FDEA6C4508675 |
|
||||
# AW 7a 1iter 32outBytes 127pw 127sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b6275563661776930,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d70627879,1,2212BB287D744DEF4CC1BC51EE73EE191966BCF7B1F62A98DD2632783C3301BD |
|
||||
# AW 7b 100000iter 32outBytes 127pw 127sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b6275563661776930,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d70627879,100000,42D29932A23F82C16F11F854757D32EB5201A1F46561440DB97D85E1D8C97896 |
|
||||
# AW 8a 1iter 32outBytes 128pw 128sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936,1,D5B7964768AAE8B3293CEDB72B061ADF08ADB2FC75536330CBB41F1C03BC699E |
|
||||
# AW 8b 100000iter 32outBytes 128pw 128sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936,100000,3D3A047ABF790AABE0EEBB907E4648D4E3202474FE937BF6E5EC8EFE5F30752D |
|
||||
# AW 9a 1iter 32outBytes 129pw 129sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b62755636617769303455,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d706278793650,1,F83D917F329DA4A215F5350BB7C4A614854184F6FAF204D352C73E6F345B22C8 |
|
||||
# AW 9b 100000iter 32outBytes 129pw 129sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b62755636617769303455,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d706278793650,100000,029D495DC4FF9A27D4BC532B6C9E435A74DDF19087113A207FC8D0FC6F412208 |
|
||||
# AW 10a 1iter 32outBytes 1025pw 1025sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034557a3365624541687a5a347665314132776735436e4c58645a4335593767776656676245675a53546d6f5951537a43354f57346466726a71697741705441434f36786f4f4c31416a576a3658366636714666463854566d4f7a553952684f64314e3451747a574934665036465974744e7a3546754c6474595658575658483254663749396669654d65574348544d6b4d3456636d5179514870626350384d45623566316736436b6735786b3348517233774d427651634f4870435079314b3848434d376135776b5044686756413042566d774e707352496244515a5274484b36645436624779616c70366762465a427542487744383667547a6b72465937486b4f5672676330674a63474a5a65363543653876344a6e354f7a6b75567369553865666d32507732526e62705753417237536b56644377584b3258534a445135665a344842457a395654465972473233454c754c6a7678356e6a4f4c4e6744414a7566354a4232746e346e4d6a6a636e6c31653871635956775a71467a4576327a684c7944574d6b5634747a6c3461734c6e7679417854426b7850525a6a3270524142577762336b456f6670734859784d54416e33385953705a72656f5869705a57426e7536484455526172755861495059465059486c394c73397773754437727a614766624f796656674c49474b35724f447068775241376c6d383862474b5938623774574f746570794576614c784d4937475a4635536377705a54596545444e554b507a764d32496d397a656849617a6e7067754e644e584e4d4c576e7750753448367a4576616a6b7733473375635369584b6d6836584e6533686b6453414e6d33766e787a52586d346663757a4178363849456c584532626b4746456c6c75444c6f3645735544575a344a4957425661447759644a78387543586251646f69667a4373356b7575436c614461447149686235684a325752386d78697565467353306144476449596d79653573766d4e6d7a5178466d644f6b486f463743667775553179793475454574397650535032774670316479614d764a573638767442346b64644c6d493667496756566354365a5831516d36577375735072646973504c423253636f64586f6a43624c33444c6a36504b47385144564d5754724c3154706166543277736c526c656457496873546c76326d493343303636574d635453774b4c58644544685676464a365368694c4b534e37676e52726c4530426e4177,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936506c4264494c424f6b4b554236544754504a5868317470644f485447364b754976636251703971576a6166317578414b676954745952494868786a4a4932766956613666445a3637514f6f754f6166325258516870735761547441566e66663650494663764a68645044464756356e766d5a576f435a516f646a36795852444850773950794630694c596d3975467445756e6c41417847423571716561345835745a7642314f664c5677796d593361334a506a64785464764878434862717145307a697036314a4e71646d65577847746c5242433643476f4369484f34587848436e745142524a446347307a57376a6f5464677454426172735151686c4c5842474d4e42534e6d6d546244663368467461775542434a483138494169524d777965514a624a326245527359334d5652507559436634417537674e3732694768316c526b745351744546796537704f34366b4d585272456a48515758496e4d7a7a79375832537458557a48565446463256644f6f4b6e30575571464e7642365046377149734f6c594b6a3537626931507361333473383557784d5362546b68726437564864485a6b545661576472616f6858594f65506465457649774f62434745586b4554557a714d355032797a6f424f4a53646a7049596161387a7a644c4433797262315477435a754a567873727130585859367645725534516e74735730393732586d474e79756d464e4a69506d344f4e4b6831524c7653316b646459336e6d3832373653345455755a667252514f3851785a524e7553615a49384a525a7035566f6a4235446b74754d7841516b716f506a5135567462366f58654f79593539314342314d455731664c544373304e724c33323153614e524d717a613145546f67417870456959775a367049676e4d6d53714e4d52645a6e43714134674d5777316c49564154574b38334f436569634e52554e4f64667a5337413876624c636d764b5074704f4676684e7a77727255646b76754b7661594a76695167655237736e4765744f394a4c4377496c48496a3532674d434e553138643332534a6c37586f6d746c337749653032534d767131693142636158376c58696f7157476d6756714257553366735575477748693652554b43435164454f42664e6f32576470466143666c63676e6e304f366a564843716b763863516b3831417153303072416d4847434e547779413654713554586f4c6c446e43386741516a4455735a70307a,1,4D7AB8C17E8906EF0D8BF41835A41138FA844C7949AC4567108008284DB323F7 |
|
||||
# AW 10b 100000iter 32outBytes 1025pw 1025sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034557a3365624541687a5a347665314132776735436e4c58645a4335593767776656676245675a53546d6f5951537a43354f57346466726a71697741705441434f36786f4f4c31416a576a3658366636714666463854566d4f7a553952684f64314e3451747a574934665036465974744e7a3546754c6474595658575658483254663749396669654d65574348544d6b4d3456636d5179514870626350384d45623566316736436b6735786b3348517233774d427651634f4870435079314b3848434d376135776b5044686756413042566d774e707352496244515a5274484b36645436624779616c70366762465a427542487744383667547a6b72465937486b4f5672676330674a63474a5a65363543653876344a6e354f7a6b75567369553865666d32507732526e62705753417237536b56644377584b3258534a445135665a344842457a395654465972473233454c754c6a7678356e6a4f4c4e6744414a7566354a4232746e346e4d6a6a636e6c31653871635956775a71467a4576327a684c7944574d6b5634747a6c3461734c6e7679417854426b7850525a6a3270524142577762336b456f6670734859784d54416e33385953705a72656f5869705a57426e7536484455526172755861495059465059486c394c73397773754437727a614766624f796656674c49474b35724f447068775241376c6d383862474b5938623774574f746570794576614c784d4937475a4635536377705a54596545444e554b507a764d32496d397a656849617a6e7067754e644e584e4d4c576e7750753448367a4576616a6b7733473375635369584b6d6836584e6533686b6453414e6d33766e787a52586d346663757a4178363849456c584532626b4746456c6c75444c6f3645735544575a344a4957425661447759644a78387543586251646f69667a4373356b7575436c614461447149686235684a325752386d78697565467353306144476449596d79653573766d4e6d7a5178466d644f6b486f463743667775553179793475454574397650535032774670316479614d764a573638767442346b64644c6d493667496756566354365a5831516d36577375735072646973504c423253636f64586f6a43624c33444c6a36504b47385144564d5754724c3154706166543277736c526c656457496873546c76326d493343303636574d635453774b4c58644544685676464a365368694c4b534e37676e52726c4530426e4177,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936506c4264494c424f6b4b554236544754504a5868317470644f485447364b754976636251703971576a6166317578414b676954745952494868786a4a4932766956613666445a3637514f6f754f6166325258516870735761547441566e66663650494663764a68645044464756356e766d5a576f435a516f646a36795852444850773950794630694c596d3975467445756e6c41417847423571716561345835745a7642314f664c5677796d593361334a506a64785464764878434862717145307a697036314a4e71646d65577847746c5242433643476f4369484f34587848436e745142524a446347307a57376a6f5464677454426172735151686c4c5842474d4e42534e6d6d546244663368467461775542434a483138494169524d777965514a624a326245527359334d5652507559436634417537674e3732694768316c526b745351744546796537704f34366b4d585272456a48515758496e4d7a7a79375832537458557a48565446463256644f6f4b6e30575571464e7642365046377149734f6c594b6a3537626931507361333473383557784d5362546b68726437564864485a6b545661576472616f6858594f65506465457649774f62434745586b4554557a714d355032797a6f424f4a53646a7049596161387a7a644c4433797262315477435a754a567873727130585859367645725534516e74735730393732586d474e79756d464e4a69506d344f4e4b6831524c7653316b646459336e6d3832373653345455755a667252514f3851785a524e7553615a49384a525a7035566f6a4235446b74754d7841516b716f506a5135567462366f58654f79593539314342314d455731664c544373304e724c33323153614e524d717a613145546f67417870456959775a367049676e4d6d53714e4d52645a6e43714134674d5777316c49564154574b38334f436569634e52554e4f64667a5337413876624c636d764b5074704f4676684e7a77727255646b76754b7661594a76695167655237736e4765744f394a4c4377496c48496a3532674d434e553138643332534a6c37586f6d746c337749653032534d767131693142636158376c58696f7157476d6756714257553366735575477748693652554b43435164454f42664e6f32576470466143666c63676e6e304f366a564843716b763863516b3831417153303072416d4847434e547779413654713554586f4c6c446e43386741516a4455735a70307a,100000,25BC2936281DB8D43C6D612B1C6F7A137EC53E0F45777252401813D5AB6C7A0E |
|
||||
# AW Trunc 1a 1iter 31outBytes 31pw 31sa |
|
||||
256,706173734441544162303041423759784454546c5248326471784478313947,73616c744b4559626354635848434278746a4432506e426834344149513658,1,089314BCDFF35115C3240C0CEE274C114C7BC49FD498F853928A385528C9D9 |
|
||||
# AW Trunc 1b 100000iter 31outBytes 31pw 31sa |
|
||||
256,706173734441544162303041423759784454546c5248326471784478313947,73616c744b4559626354635848434278746a4432506e426834344149513658,100000,4A087BE50A80D23CAF4906010CEB7C9BCCBDDAE52380DD60B6DAFF4A2287CA |
|
||||
# AW Trunc 2a 1iter 31outBytes 32pw 32sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744,73616c744b4559626354635848434278746a4432506e42683434414951365855,1,806E79AEA28676B851B61D6D76E55DD49DC6781E50B76E2C1F32A2FFAEE916 |
|
||||
# AW Trunc 2b 100000iter 31outBytes 32pw 32sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744,73616c744b4559626354635848434278746a4432506e42683434414951365855,100000,89D738B7AFACEC234157C84390C8357D34CCBF267C2DD14C8D357C4A459F53 |
|
||||
# AW Trunc 3a 1iter 31outBytes 33pw 33sa |
|
||||
256,706173734441544162303041423759784454546c52483264717844783139474478,73616c744b4559626354635848434278746a4432506e426834344149513658554f,1,CCDE3C818E49B7CA1103A9C88597AC4B516E600F8084372901E1E88F56277F |
|
||||
# AW Trunc 3b 100000iter 31outBytes 33pw 33sa |
|
||||
256,706173734441544162303041423759784454546c52483264717844783139474478,73616c744b4559626354635848434278746a4432506e426834344149513658554f,100000,8FEA43515B6669B32619916664D03A9547D667BBA4249499D80A0D53E379DC |
|
||||
# AW Trunc 4a 1iter 31outBytes 63pw 63sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c7474704535,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a65,1,3B28BF8995D81DDF78040C36D2E22C3B7C674BA05F91F11E3319BFB6FC8AC6 |
|
||||
# AW Trunc 4b 100000iter 31outBytes 63pw 63sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c7474704535,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a65,100000,DE166AF05815A27B3317662E72ECC139B262911F8790CCE62B5D10D9CF4BE3 |
|
||||
# AW Trunc 5a 1iter 31outBytes 64pw 64sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d,1,43B34EC2B78FB5E1ABA41A5453F733C65B6604626D0F0C0BCC275CDC32F471 |
|
||||
# AW Trunc 5b 100000iter 31outBytes 64pw 64sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d,100000,78CDCD1505BBF7AF1695173C147398BFBB57A774AA93F8F7A415F87A84C6C0 |
|
||||
# AW Trunc 6a 1iter 31outBytes 65pw 65sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c74747045353755,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b,1,57547F8DDB48E9F9926723050AFB0ADFA48F0FB8C0D7274448F55595FEBEC5 |
|
||||
# AW Trunc 6b 100000iter 31outBytes 65pw 65sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c74747045353755,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b,100000,844E50F6F72A2EA3D5D23BF781DF0F8D3B89BF5D37D609F9B87FDEA6C45086 |
|
||||
# AW Trunc 7a 1iter 31outBytes 127pw 127sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b6275563661776930,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d70627879,1,2212BB287D744DEF4CC1BC51EE73EE191966BCF7B1F62A98DD2632783C3301 |
|
||||
# AW Trunc 7b 100000iter 31outBytes 127pw 127sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b6275563661776930,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d70627879,100000,42D29932A23F82C16F11F854757D32EB5201A1F46561440DB97D85E1D8C978 |
|
||||
# AW Trunc 7a 1iter 31outBytes 128pw 128sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936,1,D5B7964768AAE8B3293CEDB72B061ADF08ADB2FC75536330CBB41F1C03BC69 |
|
||||
# AW Trunc 8b 100000iter 31outBytes 128pw 128sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936,100000,3D3A047ABF790AABE0EEBB907E4648D4E3202474FE937BF6E5EC8EFE5F3075 |
|
||||
# AW Trunc 9a 1iter 31outBytes 129pw 129sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b62755636617769303455,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d706278793650,1,F83D917F329DA4A215F5350BB7C4A614854184F6FAF204D352C73E6F345B22 |
|
||||
# AW Trunc 9b 100000iter 31outBytes 129pw 129sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b62755636617769303455,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d706278793650,100000,029D495DC4FF9A27D4BC532B6C9E435A74DDF19087113A207FC8D0FC6F4122 |
|
||||
# AW Trunc 10a 1iter 31outBytes 1025pw 1025sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034557a3365624541687a5a347665314132776735436e4c58645a4335593767776656676245675a53546d6f5951537a43354f57346466726a71697741705441434f36786f4f4c31416a576a3658366636714666463854566d4f7a553952684f64314e3451747a574934665036465974744e7a3546754c6474595658575658483254663749396669654d65574348544d6b4d3456636d5179514870626350384d45623566316736436b6735786b3348517233774d427651634f4870435079314b3848434d376135776b5044686756413042566d774e707352496244515a5274484b36645436624779616c70366762465a427542487744383667547a6b72465937486b4f5672676330674a63474a5a65363543653876344a6e354f7a6b75567369553865666d32507732526e62705753417237536b56644377584b3258534a445135665a344842457a395654465972473233454c754c6a7678356e6a4f4c4e6744414a7566354a4232746e346e4d6a6a636e6c31653871635956775a71467a4576327a684c7944574d6b5634747a6c3461734c6e7679417854426b7850525a6a3270524142577762336b456f6670734859784d54416e33385953705a72656f5869705a57426e7536484455526172755861495059465059486c394c73397773754437727a614766624f796656674c49474b35724f447068775241376c6d383862474b5938623774574f746570794576614c784d4937475a4635536377705a54596545444e554b507a764d32496d397a656849617a6e7067754e644e584e4d4c576e7750753448367a4576616a6b7733473375635369584b6d6836584e6533686b6453414e6d33766e787a52586d346663757a4178363849456c584532626b4746456c6c75444c6f3645735544575a344a4957425661447759644a78387543586251646f69667a4373356b7575436c614461447149686235684a325752386d78697565467353306144476449596d79653573766d4e6d7a5178466d644f6b486f463743667775553179793475454574397650535032774670316479614d764a573638767442346b64644c6d493667496756566354365a5831516d36577375735072646973504c423253636f64586f6a43624c33444c6a36504b47385144564d5754724c3154706166543277736c526c656457496873546c76326d493343303636574d635453774b4c58644544685676464a365368694c4b534e37676e52726c4530426e4177,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936506c4264494c424f6b4b554236544754504a5868317470644f485447364b754976636251703971576a6166317578414b676954745952494868786a4a4932766956613666445a3637514f6f754f6166325258516870735761547441566e66663650494663764a68645044464756356e766d5a576f435a516f646a36795852444850773950794630694c596d3975467445756e6c41417847423571716561345835745a7642314f664c5677796d593361334a506a64785464764878434862717145307a697036314a4e71646d65577847746c5242433643476f4369484f34587848436e745142524a446347307a57376a6f5464677454426172735151686c4c5842474d4e42534e6d6d546244663368467461775542434a483138494169524d777965514a624a326245527359334d5652507559436634417537674e3732694768316c526b745351744546796537704f34366b4d585272456a48515758496e4d7a7a79375832537458557a48565446463256644f6f4b6e30575571464e7642365046377149734f6c594b6a3537626931507361333473383557784d5362546b68726437564864485a6b545661576472616f6858594f65506465457649774f62434745586b4554557a714d355032797a6f424f4a53646a7049596161387a7a644c4433797262315477435a754a567873727130585859367645725534516e74735730393732586d474e79756d464e4a69506d344f4e4b6831524c7653316b646459336e6d3832373653345455755a667252514f3851785a524e7553615a49384a525a7035566f6a4235446b74754d7841516b716f506a5135567462366f58654f79593539314342314d455731664c544373304e724c33323153614e524d717a613145546f67417870456959775a367049676e4d6d53714e4d52645a6e43714134674d5777316c49564154574b38334f436569634e52554e4f64667a5337413876624c636d764b5074704f4676684e7a77727255646b76754b7661594a76695167655237736e4765744f394a4c4377496c48496a3532674d434e553138643332534a6c37586f6d746c337749653032534d767131693142636158376c58696f7157476d6756714257553366735575477748693652554b43435164454f42664e6f32576470466143666c63676e6e304f366a564843716b763863516b3831417153303072416d4847434e547779413654713554586f4c6c446e43386741516a4455735a70307a,1,4D7AB8C17E8906EF0D8BF41835A41138FA844C7949AC4567108008284DB323 |
|
||||
# AW Trunc 10b 100000iter 31outBytes 1025pw 1025sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034557a3365624541687a5a347665314132776735436e4c58645a4335593767776656676245675a53546d6f5951537a43354f57346466726a71697741705441434f36786f4f4c31416a576a3658366636714666463854566d4f7a553952684f64314e3451747a574934665036465974744e7a3546754c6474595658575658483254663749396669654d65574348544d6b4d3456636d5179514870626350384d45623566316736436b6735786b3348517233774d427651634f4870435079314b3848434d376135776b5044686756413042566d774e707352496244515a5274484b36645436624779616c70366762465a427542487744383667547a6b72465937486b4f5672676330674a63474a5a65363543653876344a6e354f7a6b75567369553865666d32507732526e62705753417237536b56644377584b3258534a445135665a344842457a395654465972473233454c754c6a7678356e6a4f4c4e6744414a7566354a4232746e346e4d6a6a636e6c31653871635956775a71467a4576327a684c7944574d6b5634747a6c3461734c6e7679417854426b7850525a6a3270524142577762336b456f6670734859784d54416e33385953705a72656f5869705a57426e7536484455526172755861495059465059486c394c73397773754437727a614766624f796656674c49474b35724f447068775241376c6d383862474b5938623774574f746570794576614c784d4937475a4635536377705a54596545444e554b507a764d32496d397a656849617a6e7067754e644e584e4d4c576e7750753448367a4576616a6b7733473375635369584b6d6836584e6533686b6453414e6d33766e787a52586d346663757a4178363849456c584532626b4746456c6c75444c6f3645735544575a344a4957425661447759644a78387543586251646f69667a4373356b7575436c614461447149686235684a325752386d78697565467353306144476449596d79653573766d4e6d7a5178466d644f6b486f463743667775553179793475454574397650535032774670316479614d764a573638767442346b64644c6d493667496756566354365a5831516d36577375735072646973504c423253636f64586f6a43624c33444c6a36504b47385144564d5754724c3154706166543277736c526c656457496873546c76326d493343303636574d635453774b4c58644544685676464a365368694c4b534e37676e52726c4530426e4177,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936506c4264494c424f6b4b554236544754504a5868317470644f485447364b754976636251703971576a6166317578414b676954745952494868786a4a4932766956613666445a3637514f6f754f6166325258516870735761547441566e66663650494663764a68645044464756356e766d5a576f435a516f646a36795852444850773950794630694c596d3975467445756e6c41417847423571716561345835745a7642314f664c5677796d593361334a506a64785464764878434862717145307a697036314a4e71646d65577847746c5242433643476f4369484f34587848436e745142524a446347307a57376a6f5464677454426172735151686c4c5842474d4e42534e6d6d546244663368467461775542434a483138494169524d777965514a624a326245527359334d5652507559436634417537674e3732694768316c526b745351744546796537704f34366b4d585272456a48515758496e4d7a7a79375832537458557a48565446463256644f6f4b6e30575571464e7642365046377149734f6c594b6a3537626931507361333473383557784d5362546b68726437564864485a6b545661576472616f6858594f65506465457649774f62434745586b4554557a714d355032797a6f424f4a53646a7049596161387a7a644c4433797262315477435a754a567873727130585859367645725534516e74735730393732586d474e79756d464e4a69506d344f4e4b6831524c7653316b646459336e6d3832373653345455755a667252514f3851785a524e7553615a49384a525a7035566f6a4235446b74754d7841516b716f506a5135567462366f58654f79593539314342314d455731664c544373304e724c33323153614e524d717a613145546f67417870456959775a367049676e4d6d53714e4d52645a6e43714134674d5777316c49564154574b38334f436569634e52554e4f64667a5337413876624c636d764b5074704f4676684e7a77727255646b76754b7661594a76695167655237736e4765744f394a4c4377496c48496a3532674d434e553138643332534a6c37586f6d746c337749653032534d767131693142636158376c58696f7157476d6756714257553366735575477748693652554b43435164454f42664e6f32576470466143666c63676e6e304f366a564843716b763863516b3831417153303072416d4847434e547779413654713554586f4c6c446e43386741516a4455735a70307a,100000,25BC2936281DB8D43C6D612B1C6F7A137EC53E0F45777252401813D5AB6C7A |
|
||||
# AW Ext 1a 1iter 33outBytes 31pw 31sa |
|
||||
256,706173734441544162303041423759784454546c5248326471784478313947,73616c744b4559626354635848434278746a4432506e426834344149513658,1,089314BCDFF35115C3240C0CEE274C114C7BC49FD498F853928A385528C9D9C34D |
|
||||
# AW Ext 1b 100000iter 33outBytes 31pw 31sa |
|
||||
256,706173734441544162303041423759784454546c5248326471784478313947,73616c744b4559626354635848434278746a4432506e426834344149513658,100000,4A087BE50A80D23CAF4906010CEB7C9BCCBDDAE52380DD60B6DAFF4A2287CA4148 |
|
||||
# AW Ext 2a 1iter 33outBytes 32pw 32sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744,73616c744b4559626354635848434278746a4432506e42683434414951365855,1,806E79AEA28676B851B61D6D76E55DD49DC6781E50B76E2C1F32A2FFAEE91624BB |
|
||||
# AW Ext 2b 100000iter 33outBytes 32pw 32sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744,73616c744b4559626354635848434278746a4432506e42683434414951365855,100000,89D738B7AFACEC234157C84390C8357D34CCBF267C2DD14C8D357C4A459F5392E8 |
|
||||
# AW Ext 3a 1iter 33outBytes 33pw 33sa |
|
||||
256,706173734441544162303041423759784454546c52483264717844783139474478,73616c744b4559626354635848434278746a4432506e426834344149513658554f,1,CCDE3C818E49B7CA1103A9C88597AC4B516E600F8084372901E1E88F56277FC50F |
|
||||
# AW Ext 3b 100000iter 33outBytes 33pw 33sa |
|
||||
256,706173734441544162303041423759784454546c52483264717844783139474478,73616c744b4559626354635848434278746a4432506e426834344149513658554f,100000,8FEA43515B6669B32619916664D03A9547D667BBA4249499D80A0D53E379DC18C9 |
|
||||
# AW Ext 4a 1iter 33outBytes 63pw 63sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c7474704535,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a65,1,3B28BF8995D81DDF78040C36D2E22C3B7C674BA05F91F11E3319BFB6FC8AC69EFA |
|
||||
# AW Ext 4b 100000iter 33outBytes 63pw 63sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c7474704535,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a65,100000,DE166AF05815A27B3317662E72ECC139B262911F8790CCE62B5D10D9CF4BE3DC6F |
|
||||
# AW Ext 5a 1iter 33outBytes 64pw 64sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d,1,43B34EC2B78FB5E1ABA41A5453F733C65B6604626D0F0C0BCC275CDC32F4717BC8 |
|
||||
# AW Ext 5b 100000iter 33outBytes 64pw 64sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d,100000,78CDCD1505BBF7AF1695173C147398BFBB57A774AA93F8F7A415F87A84C6C03BF3 |
|
||||
# AW Ext 6a 1iter 33outBytes 65pw 65sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c74747045353755,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b,1,57547F8DDB48E9F9926723050AFB0ADFA48F0FB8C0D7274448F55595FEBEC5EAD8 |
|
||||
# AW Ext 6b 100000iter 33outBytes 65pw 65sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c74747045353755,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b,100000,844E50F6F72A2EA3D5D23BF781DF0F8D3B89BF5D37D609F9B87FDEA6C450867559 |
|
||||
# AW Ext 7a 1iter 33outBytes 127pw 127sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b6275563661776930,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d70627879,1,2212BB287D744DEF4CC1BC51EE73EE191966BCF7B1F62A98DD2632783C3301BDE3 |
|
||||
# AW Ext 7b 100000iter 33outBytes 127pw 127sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b6275563661776930,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d70627879,100000,42D29932A23F82C16F11F854757D32EB5201A1F46561440DB97D85E1D8C978962E |
|
||||
# AW Ext 8a 1iter 33outBytes 128pw 128sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936,1,D5B7964768AAE8B3293CEDB72B061ADF08ADB2FC75536330CBB41F1C03BC699E08 |
|
||||
# AW Ext 8b 100000iter 33outBytes 128pw 128sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936,100000,3D3A047ABF790AABE0EEBB907E4648D4E3202474FE937BF6E5EC8EFE5F30752D56 |
|
||||
# AW Ext 9a 1iter 33outBytes 129pw 129sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b62755636617769303455,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d706278793650,1,F83D917F329DA4A215F5350BB7C4A614854184F6FAF204D352C73E6F345B22C88C |
|
||||
# AW Ext 9b 100000iter 33outBytes 129pw 129sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b62755636617769303455,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d706278793650,100000,029D495DC4FF9A27D4BC532B6C9E435A74DDF19087113A207FC8D0FC6F4122085F |
|
||||
# AW Ext 10a 1iter 33outBytes 1025pw 1025sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034557a3365624541687a5a347665314132776735436e4c58645a4335593767776656676245675a53546d6f5951537a43354f57346466726a71697741705441434f36786f4f4c31416a576a3658366636714666463854566d4f7a553952684f64314e3451747a574934665036465974744e7a3546754c6474595658575658483254663749396669654d65574348544d6b4d3456636d5179514870626350384d45623566316736436b6735786b3348517233774d427651634f4870435079314b3848434d376135776b5044686756413042566d774e707352496244515a5274484b36645436624779616c70366762465a427542487744383667547a6b72465937486b4f5672676330674a63474a5a65363543653876344a6e354f7a6b75567369553865666d32507732526e62705753417237536b56644377584b3258534a445135665a344842457a395654465972473233454c754c6a7678356e6a4f4c4e6744414a7566354a4232746e346e4d6a6a636e6c31653871635956775a71467a4576327a684c7944574d6b5634747a6c3461734c6e7679417854426b7850525a6a3270524142577762336b456f6670734859784d54416e33385953705a72656f5869705a57426e7536484455526172755861495059465059486c394c73397773754437727a614766624f796656674c49474b35724f447068775241376c6d383862474b5938623774574f746570794576614c784d4937475a4635536377705a54596545444e554b507a764d32496d397a656849617a6e7067754e644e584e4d4c576e7750753448367a4576616a6b7733473375635369584b6d6836584e6533686b6453414e6d33766e787a52586d346663757a4178363849456c584532626b4746456c6c75444c6f3645735544575a344a4957425661447759644a78387543586251646f69667a4373356b7575436c614461447149686235684a325752386d78697565467353306144476449596d79653573766d4e6d7a5178466d644f6b486f463743667775553179793475454574397650535032774670316479614d764a573638767442346b64644c6d493667496756566354365a5831516d36577375735072646973504c423253636f64586f6a43624c33444c6a36504b47385144564d5754724c3154706166543277736c526c656457496873546c76326d493343303636574d635453774b4c58644544685676464a365368694c4b534e37676e52726c4530426e4177,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936506c4264494c424f6b4b554236544754504a5868317470644f485447364b754976636251703971576a6166317578414b676954745952494868786a4a4932766956613666445a3637514f6f754f6166325258516870735761547441566e66663650494663764a68645044464756356e766d5a576f435a516f646a36795852444850773950794630694c596d3975467445756e6c41417847423571716561345835745a7642314f664c5677796d593361334a506a64785464764878434862717145307a697036314a4e71646d65577847746c5242433643476f4369484f34587848436e745142524a446347307a57376a6f5464677454426172735151686c4c5842474d4e42534e6d6d546244663368467461775542434a483138494169524d777965514a624a326245527359334d5652507559436634417537674e3732694768316c526b745351744546796537704f34366b4d585272456a48515758496e4d7a7a79375832537458557a48565446463256644f6f4b6e30575571464e7642365046377149734f6c594b6a3537626931507361333473383557784d5362546b68726437564864485a6b545661576472616f6858594f65506465457649774f62434745586b4554557a714d355032797a6f424f4a53646a7049596161387a7a644c4433797262315477435a754a567873727130585859367645725534516e74735730393732586d474e79756d464e4a69506d344f4e4b6831524c7653316b646459336e6d3832373653345455755a667252514f3851785a524e7553615a49384a525a7035566f6a4235446b74754d7841516b716f506a5135567462366f58654f79593539314342314d455731664c544373304e724c33323153614e524d717a613145546f67417870456959775a367049676e4d6d53714e4d52645a6e43714134674d5777316c49564154574b38334f436569634e52554e4f64667a5337413876624c636d764b5074704f4676684e7a77727255646b76754b7661594a76695167655237736e4765744f394a4c4377496c48496a3532674d434e553138643332534a6c37586f6d746c337749653032534d767131693142636158376c58696f7157476d6756714257553366735575477748693652554b43435164454f42664e6f32576470466143666c63676e6e304f366a564843716b763863516b3831417153303072416d4847434e547779413654713554586f4c6c446e43386741516a4455735a70307a,1,4D7AB8C17E8906EF0D8BF41835A41138FA844C7949AC4567108008284DB323F7CE |
|
||||
# AW Ext 10b 100000iter 33outBytes 1025pw 1025sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034557a3365624541687a5a347665314132776735436e4c58645a4335593767776656676245675a53546d6f5951537a43354f57346466726a71697741705441434f36786f4f4c31416a576a3658366636714666463854566d4f7a553952684f64314e3451747a574934665036465974744e7a3546754c6474595658575658483254663749396669654d65574348544d6b4d3456636d5179514870626350384d45623566316736436b6735786b3348517233774d427651634f4870435079314b3848434d376135776b5044686756413042566d774e707352496244515a5274484b36645436624779616c70366762465a427542487744383667547a6b72465937486b4f5672676330674a63474a5a65363543653876344a6e354f7a6b75567369553865666d32507732526e62705753417237536b56644377584b3258534a445135665a344842457a395654465972473233454c754c6a7678356e6a4f4c4e6744414a7566354a4232746e346e4d6a6a636e6c31653871635956775a71467a4576327a684c7944574d6b5634747a6c3461734c6e7679417854426b7850525a6a3270524142577762336b456f6670734859784d54416e33385953705a72656f5869705a57426e7536484455526172755861495059465059486c394c73397773754437727a614766624f796656674c49474b35724f447068775241376c6d383862474b5938623774574f746570794576614c784d4937475a4635536377705a54596545444e554b507a764d32496d397a656849617a6e7067754e644e584e4d4c576e7750753448367a4576616a6b7733473375635369584b6d6836584e6533686b6453414e6d33766e787a52586d346663757a4178363849456c584532626b4746456c6c75444c6f3645735544575a344a4957425661447759644a78387543586251646f69667a4373356b7575436c614461447149686235684a325752386d78697565467353306144476449596d79653573766d4e6d7a5178466d644f6b486f463743667775553179793475454574397650535032774670316479614d764a573638767442346b64644c6d493667496756566354365a5831516d36577375735072646973504c423253636f64586f6a43624c33444c6a36504b47385144564d5754724c3154706166543277736c526c656457496873546c76326d493343303636574d635453774b4c58644544685676464a365368694c4b534e37676e52726c4530426e4177,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936506c4264494c424f6b4b554236544754504a5868317470644f485447364b754976636251703971576a6166317578414b676954745952494868786a4a4932766956613666445a3637514f6f754f6166325258516870735761547441566e66663650494663764a68645044464756356e766d5a576f435a516f646a36795852444850773950794630694c596d3975467445756e6c41417847423571716561345835745a7642314f664c5677796d593361334a506a64785464764878434862717145307a697036314a4e71646d65577847746c5242433643476f4369484f34587848436e745142524a446347307a57376a6f5464677454426172735151686c4c5842474d4e42534e6d6d546244663368467461775542434a483138494169524d777965514a624a326245527359334d5652507559436634417537674e3732694768316c526b745351744546796537704f34366b4d585272456a48515758496e4d7a7a79375832537458557a48565446463256644f6f4b6e30575571464e7642365046377149734f6c594b6a3537626931507361333473383557784d5362546b68726437564864485a6b545661576472616f6858594f65506465457649774f62434745586b4554557a714d355032797a6f424f4a53646a7049596161387a7a644c4433797262315477435a754a567873727130585859367645725534516e74735730393732586d474e79756d464e4a69506d344f4e4b6831524c7653316b646459336e6d3832373653345455755a667252514f3851785a524e7553615a49384a525a7035566f6a4235446b74754d7841516b716f506a5135567462366f58654f79593539314342314d455731664c544373304e724c33323153614e524d717a613145546f67417870456959775a367049676e4d6d53714e4d52645a6e43714134674d5777316c49564154574b38334f436569634e52554e4f64667a5337413876624c636d764b5074704f4676684e7a77727255646b76754b7661594a76695167655237736e4765744f394a4c4377496c48496a3532674d434e553138643332534a6c37586f6d746c337749653032534d767131693142636158376c58696f7157476d6756714257553366735575477748693652554b43435164454f42664e6f32576470466143666c63676e6e304f366a564843716b763863516b3831417153303072416d4847434e547779413654713554586f4c6c446e43386741516a4455735a70307a,100000,25BC2936281DB8D43C6D612B1C6F7A137EC53E0F45777252401813D5AB6C7A0EF8 |
|
||||
# AW Spl 1 16777216iter 7outBytes 8pw 9sa |
|
||||
256,7061737344415441,73616c744b45596263,16777216,CEF414181274D2 |
|
||||
# AW Spl 2 2097152iter 241outBytes 13pw 12sa |
|
||||
256,70617373444154416230304142,73616c744b45596263546358,2097152,2DA3D20A280599D71AECDFADEC857325950C59E0715F4576BCF532F8CAFF3E6A99976F66ACB3530751AA106783281DBE24E8688868AA45D5011220D55CCCF3860D3DA6AA91259A13949E39102A61C88B1DF45E0BCA421EA35231565DC3F7E7566C43B0497D6D98961515CC0F5C9D2BEE0A10609A6CFC03F83AEC9242A61FECF8511BB7F529FD54B74B048D69D2B71ABD28AA67E583171799983465785B3739A07670A89DCF07ED09053FD7BD3A9009A60AC8EFDFDAC2F9B5E191E80E72EEAA94E274DF7CAB3E232ABCE15D41DAEAEA91C2C55B7B86E4F9F50371B64012F09D5A9755765F9CF7556A8D8177F8BC2E0668F3 |
|
||||
# AW Spl 3 16777216iter 8outBytes 256pw 255sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034557a3365624541687a5a347665314132776735436e4c58645a4335593767776656676245675a53546d6f5951537a43354f57346466726a71697741705441434f36786f4f4c31416a576a3658366636714666463854566d4f7a553952684f64314e3451747a574934665036465974744e7a3546754c6474595658575658483254,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936506c4264494c424f6b4b554236544754504a5868317470644f485447364b754976636251703971576a6166317578414b676954745952494868786a4a4932766956613666445a3637514f6f754f6166325258516870735761547441566e66663650494663764a68645044464756356e766d5a576f435a516f646a3679585244,16777216,C81F8B52ABC33474 |
|
||||
# AW Spl 4 2097152iter 256outBytes 257pw 256sa |
|
||||
256,706173734441544162303041423759784454546c524832647178447831394744784456317a464d7a3745365156714b497a774f744d6e6c78514c747470453537556e3475313244325944376f4f5070694576434459766e74584565344e4e504c436e4747654a417262594445753678446f43665748366b627556366177693034557a3365624541687a5a347665314132776735436e4c58645a4335593767776656676245675a53546d6f5951537a43354f57346466726a71697741705441434f36786f4f4c31416a576a3658366636714666463854566d4f7a553952684f64314e3451747a574934665036465974744e7a3546754c647459565857565848325466,73616c744b4559626354635848434278746a4432506e426834344149513658554f4345534f685870457033487263474d77626a7a514b4d5361663633494a656d6b5552576f714875734965564238496c39314e6a694347516163505575397154466153684c624b4730596a3452434d56353657506a37453134454d7062787936506c4264494c424f6b4b554236544754504a5868317470644f485447364b754976636251703971576a6166317578414b676954745952494868786a4a4932766956613666445a3637514f6f754f6166325258516870735761547441566e66663650494663764a68645044464756356e766d5a576f435a516f646a367958524448,2097152,7B0968F0B9CCBB0D00AB41BE83FD1C9E31BD2C6AC8082D7D560548762CC2FCDC25FB042024D425DC6F691832332046381D9F9F9DD3DF70E31D6F856F948ECA4386BD01DB905779B5B7C9B782272EEC2E42CD7C6AC26919025C708AA99E4A7788E54FF9A732A82938F009B8933836EA6E6B76E804FFF1706BB66AD53FFA10298C8C7A4CDE6311AA4CB0A9BEB01BB4EDE9BA976CBECC9DCF7C150D787F18D4C10A7BF9A9C980FDD732096CA5094B0B15FF44F9F59B6E582EB4CF155F9C7434258DCE8364109032D7C5F5CEB1B24BE2368C3D1D405530C7CFC59D36CDA9A2580F61FAE678273FEEB6F4BB3BA7096E4EACE141CB12DF49119F4FC1F2336F1C08E05C |
|
||||
|
|
||||
# |
|
||||
# This is the first input vector of the first scrypt vector. It |
|
||||
# is unusual only in that password and salt are both zero-length. |
|
||||
# |
|
||||
256,,,1,f7ce0b653d2d72a4108cf5abe912ffdd777616dbbb27a70e8204f3ae2d0f6fad89f68f4811d1e87bcc3bd7400a9ffd29094f0184639574f39ae5a1315217bcd7894991447213bb226c25b54da86370fbcd984380374666bb8ffcb5bf40c254b067d27c51ce4ad5fed829c90b505a571b7f4d1cad6a523cda770e67bceaaf7e89 |
|
@ -1,9 +0,0 @@ |
|||||
These lists have been taken from the reference implementation at: |
|
||||
|
|
||||
https://github.com/bitcoin/bips/blob/master/bip-0039/bip-0039-wordlists.md |
|
||||
|
|
||||
With some minor changes (BOM removal). |
|
||||
|
|
||||
The c files are generated using: |
|
||||
|
|
||||
python3 tools/wordlist_cc.py /path/to/language.txt shortname |
|
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue