NEW: merged docs from other repo

This commit is contained in:
JohnE 2019-02-10 13:51:23 -08:00
parent be027b4b2a
commit 548cc40c68
16 changed files with 943 additions and 33 deletions

51
README
View File

@ -1,34 +1,33 @@
**** ***** ***** *****
*** Next Crypto ***
***** ***** ***** *****
=========================
Copius Cipher Chain (CCC)
=========================
[[ Features ]]
-uses gradle to build native files
-uses NEW CMake (CMake Android plugin)
-AEAD crypto support
-NO LEGACY. removes legacy crypto support
-WolfSSL crypto engine
-FIPS-140 ver available
-Quantum-Computing safe crypto
-super-fast NTRU algorithm
Next Crypto Engine (NCE)
========================
The say "don't roll your own crypto".
Well fsck those arogant guys!!
[[ Java Crypto Library ]]
[Crypto Providers]
-bouncy castle (various version ship)
-spongy castle
GCM not available
*** DON'T TRUST THE PROVIDERS!!! ***
Features
--------
- uses gradle to build native files
- uses NEW CMake (CMake Android plugin)
- AEAD crypto support
- NO LEGACY. removes legacy crypto support
- uses WolfSSL crypto engine
- FIPS-140 ver available
- Quantum-Computing safe crypto
- super-fast NTRU algorithm
[Key Features]
1) bluesalt - use bluetooth devices as unlock key, user, salt
-what you have (who you are, what you know)
2) random data - use camera for randomness
-fix android random problem
Why
---
* Crypto Providers in Java SUCK
- bouncy castle (various version ship)
- spongy castle
- GCM not available
- java export garbage

View File

@ -5,19 +5,17 @@ DEVELOPER README
application details
-------------------
* ./wolfssl
* ./wolfssl-lib
- builds source from wolfssl repository!! =)
- only needs to be built once (when you want a new library)
* ./app (default main source code)
* ./wolfssl-jni
- JNI for the wolfssl library
* ./ccc-jni (default main source code)
- JNI, java connections to the native binaries
- C files
* ./wolfcrypt
- test code, just a shell of .c code and the make files
Requirements

121
docs/dev_cmake.rst Normal file
View File

@ -0,0 +1,121 @@
================
CMake Tool Notes
================
* https://developer.android.com/studio/projects/configure-cmake
* https://developer.android.com/ndk/guides/cmake
Shared vs Static (also how Android/Java runs native code)
----------------------------------------------------------
The term shared library is not a perfect fit regarding Android's NDK, because in many cases the .so libraries aren't actually shared between applications. It's better to classify the libraries that the NDK builds as static and dynamic.
Every Android application is a Java application, and the only entry point for the NDK code is loading it as a dynamic library and call it trough JNI.
Static libraries are an archives of compiled object files. They get bundled in other libraries at build time. Unused portions of code from static libraries are stripped by the NDK to reduce total size.
Dynamic libraries are loaded at runtime from separate files. They can contain static libraries that they are dependent on or load more dynamic libraries.
So what you actually need for Android development is at least one shared library, that will be called from Java code, and linked with it's dependencies as static libraries preferably.
Native library
--------------
* lib*library-name*.so
"native-lib" == "libnative-lib.so" on the file system
- For example, if you specify "native-lib" as the name of your shared library in the build script, CMake creates a file named libnative-lib.so. However, when loading this library in your Java or Kotlin code, use the name you specified in the CMake build script:
static {
System.loadLibrary("native-lib");
}
Compiling C/C++ Code
--------------------
* This code will find a native NDK library (provided by Android OS), and assign the path to the
variable log-lib
find_library( # Defines the name of the path variable that stores the
# location of the NDK library.
log-lib
# Specifies the name of the NDK library that
# CMake needs to locate.
log )
* This code defines the linking process of the C/C++ Build
# Links your native library against one or more other native libraries.
target_link_libraries( # Specifies the target library.
native-lib
# Links the log library to the target library.
${log-lib} )
* Some Android libraries are source files, include them like this
add_library( app-glue
STATIC
${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c )
* Add a prebuilt library
add_library( imported-lib
SHARED
IMPORTED )
# CMake needs to find the header files for the library
include_directories( imported-lib/include/ )
set_target_properties( # Specifies the target library.
imported-lib
# Specifies the parameter you want to define.
PROPERTIES IMPORTED_LOCATION
# Provides the path to the library you want to import.
imported-lib/src/${ANDROID_ABI}/libimported-lib.so )
Example File ("CMakeLists.txt")
===============================
cmake_minimum_required(VERSION 3.4.1)
add_library( # Specifies the name of the library.
native-lib
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
src/main/cpp/native-lib.cpp )
add_library( app-glue
STATIC
${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c )
# Specifies a path to native header files.
include_directories(src/main/cpp/include/)
find_library( # Defines the name of the path variable that stores the
# location of the NDK library.
log-lib
# Specifies the name of the NDK library that
# CMake needs to locate.
log )
# You need to link static libraries against your shared native library.
target_link_libraries( native-lib app-glue ${log-lib} )

78
docs/dev_gradle Normal file
View File

@ -0,0 +1,78 @@
[[[ Gradle ]]]
[[ gradle command line switches ]]
# create a default gradle build
$ gradle init
# show that tasks available
$ gradle tasks
# clean the tests build, run the tests
$ gradle cleanTest test
# ignore any task optimization
$ gradle test --rerun-tasks
# UPDATE gradle wrapper
# (sometimes out of sync with android studio, there is an android plug too -- for gradle, it has specific compatibility)
# android plugin ver 3.1.x+ --> requires Gradle ver 4.4+
$ gradle wrapper
[[ Gradle Java ]]
https://docs.gradle.org/current/userguide/tutorial_java_projects.html
[ publish jar ]
[[ Install Multiple Gradle Binaries (brew) ]]
[ Install multiple versions ]
brew versions gradle
git clone https://github.com/Homebrew/homebrew.git
git checkout 0123456 Library/Formula/gradle.rb
brew unlink gradle
Install diff version
brew install ~/scripts/myNewGradeScript.rb
--or--
brew install Library/Formula/gradle.rb
brew switch gradle 1.9
brew switch gradle 1.10
[[ Gradle Preehond Dev Notes ]]
MODERN
Source: http://blog.paralleluniverse.co/2014/05/01/modern-java/
task deployJar(type: Jar, dependsOn: jar) {
baseName = project.name + '-deploy'
deps = configurations.runtime + configurations.runtime.allArtifacts.files
depClasses = { deps.collect { it.isDirectory() ? it : zipTree(it) } }
from(depClasses) {
exclude 'META-INF/MANIFEST.MF'
}
manifest {
attributes 'Main-Class': 'com.example.redphone.Main'
}
}
* What went wrong:
A problem was found with the configuration of task ':startScripts'.
> No value has been specified for property 'mainClassName'.
myMain = 'com.example.redphone.Main'
startScripts {
mainClassName = myMain
}

59
docs/dev_wolfssl.rst Normal file
View File

@ -0,0 +1,59 @@
====================
WolfSSL Source Notes
====================
wolfcrypt (all the c files)
----------------------------
wolfssl/wolfcrypt/
aes.c coding.c error.c integer.c poly1305.c signature.c
arc4.c compress.c fe_low_mem.c logging.c pwdbased.c srp.c
asm.c curve25519.c fe_operations.c md2.c rabbit.c tfm.c
asn.c des3.c ge_low_mem.c md4.c random.c wc_encrypt.c
blake2b.c dh.c ge_operations.c md5.c ripemd.c wc_port.c
camellia.c dsa.c hash.c memory.c rsa.c wolfevent.c
chacha.c ecc.c hc128.c misc.c sha.c
chacha20_poly1305.c ecc_fp.c hmac.c pkcs12.c sha256.c
cmac.c ed25519.c idea.c pkcs7.c sha512.c
wolfssl (crypt .h files, and ssl c files)
------------------------------------------
wolfssl/src/
crl.c include.am internal.c io.c keys.c ocsp.c sniffer.c ssl.c tls.c
wolfssl/wolfssl/
callbacks.h crl.h internal.h sniffer.h ssl.h version.h
certs_test.h error-ssl.h ocsp.h sniffer_error.h test.h
wolfssl/wolfssl/wolfcrypt/
aes.h cmac.h fe_operations.h md4.h pwdbased.h srp.h
arc4.h coding.h fips_test.h md5.h rabbit.h tfm.h
asn.h compress.h ge_operations.h mem_track.h random.h types.h
asn_public.h curve25519.h hash.h memory.h ripemd.h visibility.h
blake2-impl.h des3.h hc128.h misc.h rsa.h wc_encrypt.h
blake2-int.h dh.h hmac.h mpi_class.h settings.h wc_port.h
blake2.h dsa.h idea.h mpi_superclass.h sha.h wolfevent.h
camellia.h ecc.h integer.h pkcs12.h sha256.h
chacha.h ed25519.h logging.h pkcs7.h sha512.h
chacha20_poly1305.h error-crypt.h md2.h poly1305.h signature.h
cyassl - ctaocrypt
------------------
wolfssl/ctaocrypt/
aes.c hmac.c random.c sha.c sha512.c wolfcrypt_last.c
des3.c misc.c rsa.c sha256.c wolfcrypt_first.c
wolfssl/cyassl
*.h files; general header files
wolfssl/cyassl/ctaocrypt
*.h files; header files for crypto libs

View File

@ -0,0 +1,31 @@
ERRORS
======
WARNINGS
========
SDK Build Tools WARNING
-----------------------
WARNING: The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
API Level and Google Play
-------------------------
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/wolfssl/build.gradle:10: Error: Google Play will soon require that apps target API level 26 or higher. This will be required for new apps in August 2018, and for updates to existing apps in November 2018. [ExpiringTargetSdkVersion]
targetSdkVersion 25

133
docs/logs/ndk_build_001.log Normal file
View File

@ -0,0 +1,133 @@
> Task :ccc:generateJsonModelDebug
Variant=debug ABI=armeabi-v7a :-- Check for working C compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang
Variant=debug ABI=armeabi-v7a :-- Check for working C compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -- works
Variant=debug ABI=armeabi-v7a :-- Detecting C compiler ABI info
Variant=debug ABI=armeabi-v7a :-- Detecting C compiler ABI info - done
Variant=debug ABI=armeabi-v7a :-- Detecting C compile features
Variant=debug ABI=armeabi-v7a :-- Detecting C compile features - done
Variant=debug ABI=armeabi-v7a :-- Check for working CXX compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++
Variant=debug ABI=armeabi-v7a :-- Check for working CXX compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -- works
Variant=debug ABI=armeabi-v7a :-- Detecting CXX compiler ABI info
Variant=debug ABI=armeabi-v7a :-- Detecting CXX compiler ABI info - done
Variant=debug ABI=armeabi-v7a :-- Detecting CXX compile features
Variant=debug ABI=armeabi-v7a :-- Detecting CXX compile features - done
Variant=debug ABI=armeabi-v7a :-- Configuring done
Variant=debug ABI=armeabi-v7a :-- Generating done
Variant=debug ABI=armeabi-v7a :-- Build files have been written to: /Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/.externalNativeBuild/cmake/debug/armeabi-v7a
Variant=debug ABI=arm64-v8a :-- Check for working C compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang
Variant=debug ABI=arm64-v8a :-- Check for working C compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -- works
Variant=debug ABI=arm64-v8a :-- Detecting C compiler ABI info
Variant=debug ABI=arm64-v8a :-- Detecting C compiler ABI info - done
Variant=debug ABI=arm64-v8a :-- Detecting C compile features
Variant=debug ABI=arm64-v8a :-- Detecting C compile features - done
Variant=debug ABI=arm64-v8a :-- Check for working CXX compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++
Variant=debug ABI=arm64-v8a :-- Check for working CXX compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -- works
Variant=debug ABI=arm64-v8a :-- Detecting CXX compiler ABI info
Variant=debug ABI=arm64-v8a :-- Detecting CXX compiler ABI info - done
Variant=debug ABI=arm64-v8a :-- Detecting CXX compile features
Variant=debug ABI=arm64-v8a :-- Detecting CXX compile features - done
Variant=debug ABI=arm64-v8a :-- Configuring done
Variant=debug ABI=arm64-v8a :-- Generating done
Variant=debug ABI=arm64-v8a :-- Build files have been written to: /Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/.externalNativeBuild/cmake/debug/arm64-v8a
Variant=debug ABI=x86 :-- Check for working C compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang
Variant=debug ABI=x86 :-- Check for working C compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -- works
Variant=debug ABI=x86 :-- Detecting C compiler ABI info
Variant=debug ABI=x86 :-- Detecting C compiler ABI info - done
Variant=debug ABI=x86 :-- Detecting C compile features
Variant=debug ABI=x86 :-- Detecting C compile features - done
Variant=debug ABI=x86 :-- Check for working CXX compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++
Variant=debug ABI=x86 :-- Check for working CXX compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -- works
Variant=debug ABI=x86 :-- Detecting CXX compiler ABI info
Variant=debug ABI=x86 :-- Detecting CXX compiler ABI info - done
Variant=debug ABI=x86 :-- Detecting CXX compile features
Variant=debug ABI=x86 :-- Detecting CXX compile features - done
Variant=debug ABI=x86 :-- Configuring done
Variant=debug ABI=x86 :-- Generating done
Variant=debug ABI=x86 :-- Build files have been written to: /Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/.externalNativeBuild/cmake/debug/x86
Variant=debug ABI=x86_64 :-- Check for working C compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang
Variant=debug ABI=x86_64 :-- Check for working C compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -- works
Variant=debug ABI=x86_64 :-- Detecting C compiler ABI info
Variant=debug ABI=x86_64 :-- Detecting C compiler ABI info - done
Variant=debug ABI=x86_64 :-- Detecting C compile features
Variant=debug ABI=x86_64 :-- Detecting C compile features - done
Variant=debug ABI=x86_64 :-- Check for working CXX compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++
Variant=debug ABI=x86_64 :-- Check for working CXX compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -- works
Variant=debug ABI=x86_64 :-- Detecting CXX compiler ABI info
Variant=debug ABI=x86_64 :-- Detecting CXX compiler ABI info - done
Variant=debug ABI=x86_64 :-- Detecting CXX compile features
Variant=debug ABI=x86_64 :-- Detecting CXX compile features - done
Variant=debug ABI=x86_64 :-- Configuring done
Variant=debug ABI=x86_64 :-- Generating done
Variant=debug ABI=x86_64 :-- Build files have been written to: /Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/.externalNativeBuild/cmake/debug/x86_64
> Task :ccc:generateJsonModelRelease
Variant=release ABI=armeabi-v7a :-- Check for working C compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang
Variant=release ABI=armeabi-v7a :-- Check for working C compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -- works
Variant=release ABI=armeabi-v7a :-- Detecting C compiler ABI info
Variant=release ABI=armeabi-v7a :-- Detecting C compiler ABI info - done
Variant=release ABI=armeabi-v7a :-- Detecting C compile features
Variant=release ABI=armeabi-v7a :-- Detecting C compile features - done
Variant=release ABI=armeabi-v7a :-- Check for working CXX compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++
Variant=release ABI=armeabi-v7a :-- Check for working CXX compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -- works
Variant=release ABI=armeabi-v7a :-- Detecting CXX compiler ABI info
Variant=release ABI=armeabi-v7a :-- Detecting CXX compiler ABI info - done
Variant=release ABI=armeabi-v7a :-- Detecting CXX compile features
Variant=release ABI=armeabi-v7a :-- Detecting CXX compile features - done
Variant=release ABI=armeabi-v7a :-- Configuring done
Variant=release ABI=armeabi-v7a :-- Generating done
Variant=release ABI=armeabi-v7a :-- Build files have been written to: /Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/.externalNativeBuild/cmake/release/armeabi-v7a
Variant=release ABI=arm64-v8a :-- Check for working C compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang
Variant=release ABI=arm64-v8a :-- Check for working C compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -- works
Variant=release ABI=arm64-v8a :-- Detecting C compiler ABI info
Variant=release ABI=arm64-v8a :-- Detecting C compiler ABI info - done
Variant=release ABI=arm64-v8a :-- Detecting C compile features
Variant=release ABI=arm64-v8a :-- Detecting C compile features - done
Variant=release ABI=arm64-v8a :-- Check for working CXX compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++
Variant=release ABI=arm64-v8a :-- Check for working CXX compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -- works
Variant=release ABI=arm64-v8a :-- Detecting CXX compiler ABI info
Variant=release ABI=arm64-v8a :-- Detecting CXX compiler ABI info - done
Variant=release ABI=arm64-v8a :-- Detecting CXX compile features
Variant=release ABI=arm64-v8a :-- Detecting CXX compile features - done
Variant=release ABI=arm64-v8a :-- Configuring done
Variant=release ABI=arm64-v8a :-- Generating done
Variant=release ABI=arm64-v8a :-- Build files have been written to: /Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/.externalNativeBuild/cmake/release/arm64-v8a
Variant=release ABI=x86 :-- Check for working C compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang
Variant=release ABI=x86 :-- Check for working C compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -- works
Variant=release ABI=x86 :-- Detecting C compiler ABI info
Variant=release ABI=x86 :-- Detecting C compiler ABI info - done
Variant=release ABI=x86 :-- Detecting C compile features
Variant=release ABI=x86 :-- Detecting C compile features - done
Variant=release ABI=x86 :-- Check for working CXX compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++
Variant=release ABI=x86 :-- Check for working CXX compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -- works
Variant=release ABI=x86 :-- Detecting CXX compiler ABI info
Variant=release ABI=x86 :-- Detecting CXX compiler ABI info - done
Variant=release ABI=x86 :-- Detecting CXX compile features
Variant=release ABI=x86 :-- Detecting CXX compile features - done
Variant=release ABI=x86 :-- Configuring done
Variant=release ABI=x86 :-- Generating done
Variant=release ABI=x86 :-- Build files have been written to: /Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/.externalNativeBuild/cmake/release/x86
Variant=release ABI=x86_64 :-- Check for working C compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang
Variant=release ABI=x86_64 :-- Check for working C compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -- works
Variant=release ABI=x86_64 :-- Detecting C compiler ABI info
Variant=release ABI=x86_64 :-- Detecting C compiler ABI info - done
Variant=release ABI=x86_64 :-- Detecting C compile features
Variant=release ABI=x86_64 :-- Detecting C compile features - done
Variant=release ABI=x86_64 :-- Check for working CXX compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++
Variant=release ABI=x86_64 :-- Check for working CXX compiler: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -- works
Variant=release ABI=x86_64 :-- Detecting CXX compiler ABI info
Variant=release ABI=x86_64 :-- Detecting CXX compiler ABI info - done
Variant=release ABI=x86_64 :-- Detecting CXX compile features
Variant=release ABI=x86_64 :-- Detecting CXX compile features - done
Variant=release ABI=x86_64 :-- Configuring done
Variant=release ABI=x86_64 :-- Generating done
Variant=release ABI=x86_64 :-- Build files have been written to: /Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/.externalNativeBuild/cmake/release/x86_64
> Task :ccc:lint
Ran lint on variant release: 1 issues found
Ran lint on variant debug: 1 issues found
Wrote HTML report to file:///Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/build/reports/lint-results.html
Wrote XML report to file:///Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/build/reports/lint-results.xml
BUILD SUCCESSFUL in 15s
58 actionable tasks: 55 executed, 3 up-to-date

View File

@ -0,0 +1,37 @@
> Task :ccc:generateJsonModelDebug
Variant=debug ABI=armeabi-v7a :-- Configuring done
Variant=debug ABI=armeabi-v7a :-- Generating done
Variant=debug ABI=armeabi-v7a :-- Build files have been written to: /Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/.externalNativeBuild/cmake/debug/armeabi-v7a
Variant=debug ABI=arm64-v8a :-- Configuring done
Variant=debug ABI=arm64-v8a :-- Generating done
Variant=debug ABI=arm64-v8a :-- Build files have been written to: /Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/.externalNativeBuild/cmake/debug/arm64-v8a
Variant=debug ABI=x86 :-- Configuring done
Variant=debug ABI=x86 :-- Generating done
Variant=debug ABI=x86 :-- Build files have been written to: /Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/.externalNativeBuild/cmake/debug/x86
Variant=debug ABI=x86_64 :-- Configuring done
Variant=debug ABI=x86_64 :-- Generating done
Variant=debug ABI=x86_64 :-- Build files have been written to: /Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/.externalNativeBuild/cmake/debug/x86_64
> Task :ccc:generateJsonModelRelease
Variant=release ABI=armeabi-v7a :-- Configuring done
Variant=release ABI=armeabi-v7a :-- Generating done
Variant=release ABI=armeabi-v7a :-- Build files have been written to: /Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/.externalNativeBuild/cmake/release/armeabi-v7a
Variant=release ABI=arm64-v8a :-- Configuring done
Variant=release ABI=arm64-v8a :-- Generating done
Variant=release ABI=arm64-v8a :-- Build files have been written to: /Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/.externalNativeBuild/cmake/release/arm64-v8a
Variant=release ABI=x86 :-- Configuring done
Variant=release ABI=x86 :-- Generating done
Variant=release ABI=x86 :-- Build files have been written to: /Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/.externalNativeBuild/cmake/release/x86
Variant=release ABI=x86_64 :-- Configuring done
Variant=release ABI=x86_64 :-- Generating done
Variant=release ABI=x86_64 :-- Build files have been written to: /Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/.externalNativeBuild/cmake/release/x86_64
> Task :ccc:lint
Ran lint on variant release: 1 issues found
Ran lint on variant debug: 1 issues found
Wrote HTML report to file:///Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/build/reports/lint-results.html
Wrote XML report to file:///Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/build/reports/lint-results.xml
BUILD SUCCESSFUL in 3s
58 actionable tasks: 5 executed, 53 up-to-date

View File

@ -0,0 +1,56 @@
> Task :ccc:externalNativeBuildDebug FAILED
Build wolfssl x86_64
ninja: no work to do.
Build wolfcrypt-jni x86_64
[1/9] Building C object src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_hmac.c.o
[2/9] Building C object src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_ecc.c.o
[3/9] Building C object src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_asn.c.o
[4/9] Building C object src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_logging.c.o
[5/9] Building C object src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_chacha.c.o
[6/9] Building C object src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_curve25519.c.o
[7/9] Building C object src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_ed25519.c.o
[8/9] Building C object src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_error.c.o
FAILED: /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang --target=x86_64-none-linux-android23 --gcc-toolchain=/usr/local/opt/android-sdk/ndk-bundle/toolchains/x86_64-4.9/prebuilt/darwin-x86_64 --sysroot=/usr/local/opt/android-sdk/ndk-bundle/sysroot -Dwolfcrypt_jni_EXPORTS -I../../../../src/main/cpp/wolfcrypt/jni/include -I../../../../src/main/cpp/wolfcrypt/../wolfssl-oem/wolfssl-git -isystem /usr/local/opt/android-sdk/ndk-bundle/sysroot/usr/include/x86_64-linux-android -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -D_POSIX_THREADS -DNDEBUG -DPERSIST_SESSION_CACHE -DPERSIST_CERT_CACHE -DATOMIC_USER -DHAVE_PK_CALLBACKS -DNO_DSA -DNO_MD4 -DNO_HC128 -DNO_RABBIT -DHAVE_OCSP -DHAVE_CRL -DWOLFSSL_JNI -DHAVE_DH -Wall -O0 -fno-limit-debug-info -fPIC -MD -MT src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_hmac.c.o -MF src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_hmac.c.o.d -o src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_hmac.c.o -c /Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_hmac.c
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_hmac.c:39:8: error: unknown type name 'WC_INLINE'
static WC_INLINE int GetHashSizeByType(int type)
^
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_hmac.c:39:18: error: expected identifier or '('
static WC_INLINE int GetHashSizeByType(int type)
^
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_hmac.c:251:14: warning: implicit declaration of function 'GetHashSizeByType' is invalid in C99 [-Wimplicit-function-declaration]
hmacSz = GetHashSizeByType(hmac->macType);
^
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_hmac.c:292:15: warning: implicit declaration of function 'GetHashSizeByType' is invalid in C99 [-Wimplicit-function-declaration]
int ret = GetHashSizeByType(type);
^
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_hmac.c:311:19: error: use of undeclared identifier 'WC_MD5'
jint result = WC_MD5;
^
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_hmac.c:320:19: error: use of undeclared identifier 'WC_SHA'
jint result = WC_SHA;
^
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_hmac.c:329:19: error: use of undeclared identifier 'WC_SHA256'; did you mean 'SHA256'?
jint result = WC_SHA256;
^~~~~~~~~
SHA256
../../../../src/main/cpp/wolfcrypt/../wolfssl-oem/wolfssl-git/wolfssl/wolfcrypt/sha256.h:53:5: note: 'SHA256' declared here
SHA256 = 2, /* hash type unique */
^
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_hmac.c:338:19: error: use of undeclared identifier 'WC_SHA384'; did you mean 'SHA384'?
jint result = WC_SHA384;
^~~~~~~~~
SHA384
../../../../src/main/cpp/wolfcrypt/../wolfssl-oem/wolfssl-git/wolfssl/wolfcrypt/hmac.h:86:5: note: 'SHA384' declared here
SHA384 = 5,
^
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_hmac.c:347:19: error: use of undeclared identifier 'WC_SHA512'; did you mean 'SHA512'?
jint result = WC_SHA512;
^~~~~~~~~
SHA512
../../../../src/main/cpp/wolfcrypt/../wolfssl-oem/wolfssl-git/wolfssl/wolfcrypt/hmac.h:83:5: note: 'SHA512' declared here
SHA512 = 4,
^
2 warnings and 7 errors generated.
ninja: build stopped: subcommand failed.
19 actionable tasks: 1 executed, 18 up-to-date

View File

@ -0,0 +1,83 @@
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :ccc:externalNativeBuildDebug FAILED
Build wolfssl x86_64
[1/1] Re-running CMake...
-- Configuring done
-- Generating done
-- Build files have been written to: /Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/.externalNativeBuild/cmake/debug/x86_64
ninja: no work to do.
Build wolfcrypt-jni x86_64
[1/1] Linking C shared library ../../../../build/intermediates/cmake/debug/obj/x86_64/libwolfcrypt-jni.so
FAILED: : && /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang --target=x86_64-none-linux-android23 --gcc-toolchain=/usr/local/opt/android-sdk/ndk-bundle/toolchains/x86_64-4.9/prebuilt/darwin-x86_64 --sysroot=/usr/local/opt/android-sdk/ndk-bundle/sysroot -fPIC -isystem /usr/local/opt/android-sdk/ndk-bundle/sysroot/usr/include/x86_64-linux-android -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -D_POSIX_THREADS -DNDEBUG -DPERSIST_SESSION_CACHE -DPERSIST_CERT_CACHE -DATOMIC_USER -DHAVE_PK_CALLBACKS -DNO_DSA -DNO_MD4 -DNO_HC128 -DNO_RABBIT -DHAVE_OCSP -DHAVE_CRL -DWOLFSSL_JNI -DHAVE_DH -Wall -O0 -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -nostdlib++ --sysroot /usr/local/opt/android-sdk/ndk-bundle/platforms/android-23/arch-x86_64 -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -L/usr/local/opt/android-sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/x86_64 -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libwolfcrypt-jni.so -o ../../../../build/intermediates/cmake/debug/obj/x86_64/libwolfcrypt-jni.so src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_fips.c.o src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_native_struct.c.o src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_aes.c.o src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_des3.c.o src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_md5.c.o src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_sha.c.o src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_rng.c.o src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_rsa.c.o src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_dh.c.o src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_ecc.c.o src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_asn.c.o src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_logging.c.o src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_chacha.c.o src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_curve25519.c.o src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_ed25519.c.o src/main/cpp/wolfcrypt/CMakeFiles/wolfcrypt-jni.dir/jni/jni_error.c.o -latomic -lm && :
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_native_struct.c:51: error: undefined reference to 'wolfSSL_Free'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_aes.c:40: error: undefined reference to 'wolfSSL_Malloc'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_aes.c:77: error: undefined reference to 'wc_AesSetKey'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_aes.c:126: error: undefined reference to 'wc_AesCbcEncrypt'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_aes.c:130: error: undefined reference to 'wc_AesCbcDecrypt'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_aes.c:191: error: undefined reference to 'wc_AesCbcEncrypt'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_aes.c:195: error: undefined reference to 'wc_AesCbcDecrypt'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_des3.c:40: error: undefined reference to 'wolfSSL_Malloc'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_des3.c:75: error: undefined reference to 'wc_Des3_SetKey'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_des3.c:124: error: undefined reference to 'wc_Des3_CbcEncrypt'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_des3.c:128: error: undefined reference to 'wc_Des3_CbcDecrypt'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_des3.c:189: error: undefined reference to 'wc_Des3_CbcEncrypt'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_des3.c:193: error: undefined reference to 'wc_Des3_CbcDecrypt'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_md5.c:43: error: undefined reference to 'wolfSSL_Malloc'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_md5.c:70: error: undefined reference to 'wc_InitMd5'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_md5.c:96: error: undefined reference to 'wc_Md5Update'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_md5.c:127: error: undefined reference to 'wc_Md5Update'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_md5.c:159: error: undefined reference to 'wc_Md5Final'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_md5.c:189: error: undefined reference to 'wc_Md5Final'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_sha.c:44: error: undefined reference to 'wolfSSL_Malloc'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_sha.c:131: error: undefined reference to 'wc_InitSha'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_sha.c:159: error: undefined reference to 'wc_ShaUpdate'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_sha.c:193: error: undefined reference to 'wc_ShaUpdate'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_sha.c:227: error: undefined reference to 'wc_ShaFinal'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_sha.c:259: error: undefined reference to 'wc_ShaFinal'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_sha.c:288: error: undefined reference to 'wc_InitSha256'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_sha.c:316: error: undefined reference to 'wc_Sha256Update'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_sha.c:351: error: undefined reference to 'wc_Sha256Update'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_sha.c:385: error: undefined reference to 'wc_Sha256Final'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_sha.c:417: error: undefined reference to 'wc_Sha256Final'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rng.c:70: error: undefined reference to 'wc_InitRng'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rng.c:95: error: undefined reference to 'wc_FreeRng'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rng.c:124: error: undefined reference to 'wc_RNG_GenerateBlock'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rng.c:156: error: undefined reference to 'wc_RNG_GenerateBlock'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:112: error: undefined reference to 'wc_RsaPublicKeyDecodeRaw'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:149: error: undefined reference to 'wc_RsaPublicKeyDecodeRaw'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:191: error: undefined reference to 'wc_RsaFlattenPublicKey'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:253: error: undefined reference to 'wc_RsaFlattenPublicKey'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:301: error: undefined reference to 'wc_InitRsaKey'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:326: error: undefined reference to 'wc_FreeRsaKey'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:400: error: undefined reference to 'wc_RsaPrivateKeyDecode'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:437: error: undefined reference to 'wc_GetPkcs8TraditionalOffset'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:441: error: undefined reference to 'wc_RsaPrivateKeyDecode'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:475: error: undefined reference to 'wc_RsaPublicKeyDecode'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:502: error: undefined reference to 'wc_RsaEncryptSize'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:544: error: undefined reference to 'wc_RsaEncryptSize'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:557: error: undefined reference to 'wc_RsaPublicEncrypt'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:577: error: undefined reference to 'wolfSSL_Free'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:608: error: undefined reference to 'wc_RsaEncryptSize'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:621: error: undefined reference to 'wc_RsaPrivateDecrypt'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:641: error: undefined reference to 'wolfSSL_Free'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:679: error: undefined reference to 'wc_RsaEncryptSize'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:692: error: undefined reference to 'wc_RsaSSL_Sign'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:712: error: undefined reference to 'wolfSSL_Free'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:756: error: undefined reference to 'wc_RsaSSL_Verify'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_dh.c:64: error: undefined reference to 'wc_InitDhKey'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_dh.c:83: error: undefined reference to 'wc_FreeDhKey'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_dh.c:115: error: undefined reference to 'wc_DhSetKey'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_dh.c:182: error: undefined reference to 'wc_DhGenerateKeyPair'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_dh.c:274: error: undefined reference to 'wc_DhCheckPubKey'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_dh.c:327: error: undefined reference to 'wc_DhAgree'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_asn.c:46: error: undefined reference to 'wc_EncodeSignature'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_asn.c:59: error: undefined reference to 'wc_EncodeSignature'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_asn.c:70: error: undefined reference to 'wc_GetCTC_HashOID'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_logging.c:35: error: undefined reference to 'wolfSSL_Debugging_ON'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_logging.c:41: error: undefined reference to 'wolfSSL_Debugging_OFF'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_error.c:32: error: undefined reference to 'wc_GetErrorString'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk/ccc/src/main/cpp/wolfcrypt/jni/jni_error.c:75: error: undefined reference to 'wc_GetErrorString'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
19 actionable tasks: 1 executed, 18 up-to-date

26
docs/nc-wc-ndk_logs Normal file
View File

@ -0,0 +1,26 @@
[[[ NC WC NDK Gradle Build Log Files ]]]
[[ gradle build ]]
# targets 'wolfssl'
$ gradle build
...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':wolfssl:externalNativeBuildRelease'.
> Unexpected native build target wolfssl. Valid values are: libwolfssl
# targets 'libwolfssl'
$ gradle build
...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':wolfssl:externalNativeBuildDebug'.
> Unexpected native build target libwolfssl. Valid values are: wolfssl

91
docs/ndk_troubleshoot.rst Normal file
View File

@ -0,0 +1,91 @@
=========================
NDK BUILD TROUBLESHOOTING
=========================
* gradle clean is not removing any .externalNativeBuild
- it removes ./build folder tho
Not seeing this:
* :app:compileDebugNdk
Completed:
* :ccc:generateJsonModelDebug
* :ccc:generateJsonModelRelease
ndk linking issue
=================
[ wc_DhCheckPubKey(key, pub, pubSz); (jni_dh.c:274) ]
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk_001/ccc/src/main/cpp/wolfcrypt/jni/jni_dh.c:274:11:
warning: implicit declaration of function 'wc_DhCheckPubKey' is invalid in C99 [-Wimplicit-function-declaration]
wc_DhCheckPubKey(key, pub, pubSz);
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk_001/ccc/src/main/cpp/wolfcrypt/jni/jni_dh.c:274:
error: undefined reference to 'wc_DhCheckPubKey'
[ length = wc_GetPkcs8TraditionalOffset(k, &offset, kSz); (jni_rsa.c:437:18) ]
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk_001/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:437:18:
warning: implicit declaration of function 'wc_GetPkcs8TraditionalOffset' is invalid in C99 [-Wimplicit-function-declaration]
length = wc_GetPkcs8TraditionalOffset(k, &offset, kSz);
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk_001/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:437:
error: undefined reference to 'wc_GetPkcs8TraditionalOffset'
FAILURE: Build failed with an exception.o-date
* What went wrong:
Execution failed for task ':ccc:externalNativeBuildDebug'.
> Build command failed.
Error while executing process /Users/j3g/apps/android-dev/android-sdk/cmake/3.6.4111459/bin/cmake with arguments {--build /Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk_001/ccc/.externalNativeBuild/cmake/debug/x86_64 --target ccc-jni}
[1/17] Building C object src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_fips.c.o
[2/17] Building C object src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_native_struct.c.o
[3/17] Building C object src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_aes.c.o
[4/17] Building C object src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_des3.c.o
[5/17] Building C object src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_md5.c.o
[6/17] Building C object src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_sha.c.o
[7/17] Building C object src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_rng.c.o
[8/17] Building C object src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_rsa.c.o
[9/17] Building C object src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_dh.c.o
[10/17] Building C object src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_ecc.c.o
[11/17] Building C object src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_asn.c.o
[12/17] Building C object src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_logging.c.o
[13/17] Building C object src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_chacha.c.o
[14/17] Building C object src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_curve25519.c.o
[15/17] Building C object src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_ed25519.c.o
[16/17] Building C object src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_error.c.o
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk_001/ccc/src/main/cpp/wolfcrypt/jni/jni_dh.c:274:11: warning: implicit declaration of function 'wc_DhCheckPubKey' is invalid in C99 [-Wimplicit-function-declaration]
: wc_DhCheckPubKey(key, pub, pubSz);
^
1 warning generated.
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk_001/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:437:18: warning: implicit declaration of function 'wc_GetPkcs8TraditionalOffset' is invalid in C99 [-Wimplicit-function-declaration]
length = wc_GetPkcs8TraditionalOffset(k, &offset, kSz);
^
1 warning generated.
[17/17] Linking C shared library ../../../../build/intermediates/cmake/debug/obj/x86_64/libccc-jni.so
FAILED: : && /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang --target=x86_64-none-linux-android23 --gcc-toolchain=/usr/local/opt/android-sdk/ndk-bundle/toolchains/x86_64-4.9/prebuilt/darwin-x86_64 --sysroot=/usr/local/opt/android-sdk/ndk-bundle/sysroot -fPIC -isystem /usr/local/opt/android-sdk/ndk-bundle/sysroot/usr/include/x86_64-linux-android -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -O0 -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -nostdlib++ --sysroot /usr/local/opt/android-sdk/ndk-bundle/platforms/android-23/arch-x86_64 -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -L/usr/local/opt/android-sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/x86_64 -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libccc-jni.so -o ../../../../build/intermediates/cmake/debug/obj/x86_64/libccc-jni.so src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_fips.c.o src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_native_struct.c.o src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_aes.c.o src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_des3.c.o src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_md5.c.o src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_sha.c.o src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_rng.c.o src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_rsa.c.o src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_dh.c.o src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_ecc.c.o src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_asn.c.o src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_logging.c.o src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_chacha.c.o src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_curve25519.c.o src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_ed25519.c.o src/main/cpp/wolfcrypt/CMakeFiles/ccc-jni.dir/jni/jni_error.c.o ../../../../dist/lib/x86_64/libwolfssl.a -latomic -lm && :
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk_001/ccc/src/main/cpp/wolfcrypt/jni/jni_rsa.c:437: error: undefined reference to 'wc_GetPkcs8TraditionalOffset'
/Volumes/malloc-dev/nextcrypto/source/nc-wc-ndk_001/ccc/src/main/cpp/wolfcrypt/jni/jni_dh.c:274: error: undefined reference to 'wc_DhCheckPubKey'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 5s

19
docs/nextcrypto_notes Normal file
View File

@ -0,0 +1,19 @@
[[ Java Crypto Library ]]
[Crypto Providers]
-bouncy castle (various version ship)
-spongy castle
GCM not available
*** DON'T TRUST THE PROVIDERS!!! ***
[Key Features]
1) bluesalt - use bluetooth devices as unlock key, user, salt
-what you have (who you are, what you know)
2) random data - use camera for randomness
-fix android random problem

67
docs/proj_agile.rst Normal file
View File

@ -0,0 +1,67 @@
=========
CCC Agile
=========
Working
-------
* combine wolfssl-lib + wolfssl-jni == ccc-ndk-jni (not ccc-jni which would be for java)
- TEST: check that all builds OK (ok-dokey)
- move from bash script builds, to all gradle (cleaning and copying libs)
* l@@k at Android Weekly emails
* TEST: add test code for JNI calls
Milestone
^^^^^^^^^
* WolfSSL validate with JNI
Backlog
-------
Tasks
^^^^^
* GET THE LATEST
- get the lastest ndk
- get the latest gradle (see if 5.x is compatible)
- get the latest wolfssl code
- COMPILE!! =)
* create "update_wolfssl.sh" script to pull latest from the repository, apply patches, build wolfssl, then copy library files to a "dist" folder for usage. As of right now the build works but the generated files aren''t auto copied. It is generated by hand.
* l@@k at https://en.wikipedia.org/wiki/NTRU
* l@@k at http://facebook.github.io/conceal/
* l@@k at https://techcrunch.com/2018/10/03/googles-cyber-unit-jigsaw-introduces-intra-a-security-app-dedicated-to-busting-censorship/
Milestones
^^^^^^^^^^
* JNI wrapper tests
- RSA Public Key Generation
- AES crypt
* normalizedcrypto
- maybe wrap nextcrypto with a *VERY* simple API
- new StrongestCrypt() (post-quantum, maybe even double-wrap)
- new Strong() (AES_GCM_256-SHA512-RSA4096)
- new Fastest()
- new LossyCrypto()
Completed
---------
* WolfSSL compile
* fixing CMake build
-discover which gradle to target --> wolfssl was main gradle app target

View File

@ -0,0 +1,26 @@
===========================
WolfSSL + WolfCrypt MERGING
===========================
* try to remove build artifacts because build stops working
nc-wc-ndk_JNI
- "ccc", jni wolfcrypt code is compiling (cool)
-
nc-wc-ndk_WOLFSSL
- wolfSSL is compiling a few times, then STOPs
nc-wc-ndk_MERGE
---------------
* hopefully can get both WolfSSL and JNI compiling

View File

@ -0,0 +1,86 @@
===============
Weekly Progress
===============
WORKING
-------
* changed from SHARED to STATIC and now build stops working
COMPLETED
---------
* build static lib (.a)
- this had the result of putting the library files at ./dist/lib/<ARCH> instead of the
default location of ./build/intermediates/cmake/debug/obj/<ARCH> and
./build/intermediates/cmake/release/obj/<ARCH>
- only one set of files copied into the ./dist/lib/<ARCH> directory...was it RELEASE
or DEBUG?? likely RELEASE...
* created new branch "wolfssl-mod", trying different things to break the build
* building shared lib (.so)
* local.properties missing...copied from newer repos
ISSUES
------
* changed from SHARED to STATIC and now build stops working
- changed back to SHARED, cleaned, build works!!!
nc-wc-ndk_MERGE
---------------
* looks like both wolfssl library and jni library were compiling
- wolfssl is a static lib (.a)
- jni is a shared lib (.so)
MISC
====
::
gradle --version
------------------------------------------------------------
Gradle 4.10.2
------------------------------------------------------------
Build time: 2018-09-19 18:10:15 UTC
Revision: b4d8d5d170bb4ba516e88d7fe5647e2323d791dd
Kotlin DSL: 1.0-rc-6
Kotlin: 1.2.61
Groovy: 2.4.15
Ant: Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM: 1.8.0_152-release (JetBrains s.r.o 25.152-b06)
OS: Mac OS X 10.14.2 x86_64
[j3g@J3G-MBPt:nc-wc-ndk_WOLFSSL] ./gradlew --version
------------------------------------------------------------
Gradle 3.3
------------------------------------------------------------
Build time: 2017-01-03 15:31:04 UTC
Revision: 075893a3d0798c0c1f322899b41ceca82e4e134b
Groovy: 2.4.7
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_152-release (JetBrains s.r.o 25.152-b06)
OS: Mac OS X 10.14.2 x86_64