virgil-crypto 2.3.0 → 3.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (259) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -0
  3. data/.gitmodules +0 -0
  4. data/.travis.yml +13 -0
  5. data/Gemfile +0 -0
  6. data/README.md +113 -9
  7. data/Rakefile +0 -0
  8. data/ext/native/src/.clang-format +37 -0
  9. data/ext/native/src/.gitignore +3 -0
  10. data/ext/native/src/.travis.yml +2 -1
  11. data/ext/native/src/CMakeLists.txt +66 -63
  12. data/ext/native/src/ChangeLog +114 -2
  13. data/ext/native/src/Dockerfile_Golang +29 -8
  14. data/ext/native/src/Jenkinsfile +61 -50
  15. data/ext/native/src/LICENSE +0 -0
  16. data/ext/native/src/README.md +137 -167
  17. data/ext/native/src/VERSION +1 -1
  18. data/ext/native/src/benchmark.md +140 -0
  19. data/ext/native/src/benchmark/CMakeLists.txt +0 -0
  20. data/ext/native/src/benchmark/benchmark_cipher.cxx +0 -0
  21. data/ext/native/src/benchmark/benchmark_hash.cxx +0 -0
  22. data/ext/native/src/benchmark/benchmark_keys.cxx +0 -0
  23. data/ext/native/src/benchmark/benchmark_pythia.cxx +61 -0
  24. data/ext/native/src/benchmark/benchmark_random.cxx +0 -0
  25. data/ext/native/src/benchmark/benchmark_signer.cxx +0 -0
  26. data/ext/native/src/ci/install-dependencies.sh +8 -12
  27. data/ext/native/src/ci/publish-docs.sh +107 -22
  28. data/ext/native/src/ci/travis-deployment-key.enc +0 -0
  29. data/ext/native/src/cmake/TransitiveArgs.cmake +78 -0
  30. data/ext/native/src/cmake/TransitiveToolchainArgs.cmake +105 -0
  31. data/ext/native/src/cmake/add_mono_metadata.cmake +103 -0
  32. data/ext/native/src/cmake/apple.cmake +56 -11
  33. data/ext/native/src/cmake/aux_source_directory_to_file.cmake +0 -0
  34. data/ext/native/src/cmake/check_pointer_size.cmake +0 -0
  35. data/ext/native/src/cmake/copy_all_files.cmake +0 -0
  36. data/ext/native/src/cmake/file_regex_replace.cmake +0 -0
  37. data/ext/native/src/cmake/find_host_utils.cmake +0 -0
  38. data/ext/native/src/cmake/uppercase_first_char.cmake +0 -0
  39. data/ext/native/src/cmake/uppercase_namespaces.cmake +3 -0
  40. data/ext/native/src/cmake/virgil_depends.cmake +0 -0
  41. data/ext/native/src/cmake/virgil_depends_local.cmake +2 -0
  42. data/ext/native/src/docs/.gitignore +0 -0
  43. data/ext/native/src/lib/CMakeLists.txt +59 -1
  44. data/ext/native/src/lib/Doxyfile.in +1 -1
  45. data/ext/native/src/lib/Info.plist.in +0 -0
  46. data/ext/native/src/lib/cmake/config.cmake.in +0 -0
  47. data/ext/native/src/lib/include/virgil/crypto/VirgilByteArrayUtils.h +0 -0
  48. data/ext/native/src/lib/include/virgil/crypto/VirgilChunkCipher.h +0 -0
  49. data/ext/native/src/lib/include/virgil/crypto/VirgilCipherBase.h +0 -0
  50. data/ext/native/src/lib/include/virgil/crypto/VirgilContentInfo.h +0 -0
  51. data/ext/native/src/lib/include/virgil/crypto/VirgilCrypto.h +13 -0
  52. data/ext/native/src/lib/include/virgil/crypto/VirgilCryptoError.h +0 -0
  53. data/ext/native/src/lib/include/virgil/crypto/VirgilCustomParams.h +0 -0
  54. data/ext/native/src/lib/include/virgil/crypto/VirgilKeyPair.h +30 -0
  55. data/ext/native/src/lib/include/virgil/crypto/VirgilSignerBase.h +0 -0
  56. data/ext/native/src/lib/include/virgil/crypto/VirgilStreamCipher.h +0 -0
  57. data/ext/native/src/lib/include/virgil/crypto/VirgilStreamSigner.h +0 -0
  58. data/ext/native/src/lib/include/virgil/crypto/VirgilTinyCipher.h +0 -0
  59. data/ext/native/src/lib/include/virgil/crypto/VirgilVersion.h +0 -0
  60. data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilAsymmetricCipher.h +17 -0
  61. data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilHKDF.h +0 -0
  62. data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilPBKDF.h +0 -0
  63. data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilSystemCryptoError.h +0 -0
  64. data/ext/native/src/lib/include/virgil/crypto/foundation/asn1/VirgilAsn1Compatible.h +0 -0
  65. data/ext/native/src/lib/include/virgil/crypto/foundation/cms/VirgilCMSContent.h +0 -0
  66. data/ext/native/src/lib/include/virgil/crypto/foundation/cms/VirgilCMSContentInfo.h +0 -0
  67. data/ext/native/src/lib/include/virgil/crypto/foundation/cms/VirgilCMSEncryptedContent.h +0 -0
  68. data/ext/native/src/lib/include/virgil/crypto/foundation/cms/VirgilCMSEnvelopedData.h +0 -0
  69. data/ext/native/src/lib/include/virgil/crypto/foundation/cms/VirgilCMSKeyTransRecipient.h +0 -0
  70. data/ext/native/src/lib/include/virgil/crypto/foundation/cms/VirgilCMSPasswordRecipient.h +0 -0
  71. data/ext/native/src/lib/include/virgil/crypto/pfs/VirgilPFS.h +0 -0
  72. data/ext/native/src/lib/include/virgil/crypto/pfs/VirgilPFSEncryptedMessage.h +0 -0
  73. data/ext/native/src/lib/include/virgil/crypto/pfs/VirgilPFSInitiatorPrivateInfo.h +0 -0
  74. data/ext/native/src/lib/include/virgil/crypto/pfs/VirgilPFSInitiatorPublicInfo.h +0 -0
  75. data/ext/native/src/lib/include/virgil/crypto/pfs/VirgilPFSPrivateKey.h +0 -0
  76. data/ext/native/src/lib/include/virgil/crypto/pfs/VirgilPFSPublicKey.h +0 -0
  77. data/ext/native/src/lib/include/virgil/crypto/pfs/VirgilPFSResponderPrivateInfo.h +0 -0
  78. data/ext/native/src/lib/include/virgil/crypto/pfs/VirgilPFSResponderPublicInfo.h +0 -0
  79. data/ext/native/src/lib/include/virgil/crypto/pfs/VirgilPFSSession.h +0 -0
  80. data/ext/native/src/lib/include/virgil/crypto/primitive/VirgilOperationCipher.h +0 -0
  81. data/ext/native/src/lib/include/virgil/crypto/primitive/VirgilOperationDH.h +0 -0
  82. data/ext/native/src/lib/include/virgil/crypto/primitive/VirgilOperationHash.h +0 -0
  83. data/ext/native/src/lib/include/virgil/crypto/primitive/VirgilOperationKDF.h +0 -0
  84. data/ext/native/src/lib/include/virgil/crypto/primitive/VirgilOperationRandom.h +0 -0
  85. data/ext/native/src/lib/include/virgil/crypto/pythia/VirgilPythia.h +181 -0
  86. data/ext/native/src/lib/include/virgil/crypto/pythia/VirgilPythiaBlindResult.h +89 -0
  87. data/ext/native/src/lib/include/virgil/crypto/pythia/VirgilPythiaContext.h +72 -0
  88. data/ext/native/src/lib/include/virgil/crypto/pythia/VirgilPythiaError.h +161 -0
  89. data/ext/native/src/lib/include/virgil/crypto/pythia/VirgilPythiaProveResult.h +89 -0
  90. data/ext/native/src/lib/include/virgil/crypto/pythia/VirgilPythiaTransformResult.h +91 -0
  91. data/ext/native/src/lib/include/virgil/crypto/pythia/VirgilPythiaTransformationKeyPair.h +87 -0
  92. data/ext/native/src/lib/include/virgil/crypto/pythia/virgil_pythia_c.h +203 -0
  93. data/ext/native/src/lib/include/virgil/crypto/stream/VirgilBytesDataSink.h +0 -0
  94. data/ext/native/src/lib/include/virgil/crypto/stream/VirgilBytesDataSource.h +0 -0
  95. data/ext/native/src/lib/mainpage.dox +6 -0
  96. data/ext/native/src/lib/module.modulemap +7 -0
  97. data/ext/native/src/lib/src/VirgilAsn1Alg.cxx +0 -0
  98. data/ext/native/src/lib/src/VirgilAsn1Alg.h +0 -0
  99. data/ext/native/src/lib/src/VirgilAsn1Compatible.cxx +0 -0
  100. data/ext/native/src/lib/src/VirgilAsymmetricCipher.cxx +82 -0
  101. data/ext/native/src/lib/src/VirgilByteArrayUtils.cxx +0 -0
  102. data/ext/native/src/lib/src/VirgilCMSContent.cxx +0 -0
  103. data/ext/native/src/lib/src/VirgilCMSContentInfo.cxx +0 -0
  104. data/ext/native/src/lib/src/VirgilCMSEncryptedContent.cxx +0 -0
  105. data/ext/native/src/lib/src/VirgilCMSEnvelopedData.cxx +0 -0
  106. data/ext/native/src/lib/src/VirgilCMSKeyTransRecipient.cxx +0 -0
  107. data/ext/native/src/lib/src/VirgilCMSPasswordRecipient.cxx +0 -0
  108. data/ext/native/src/lib/src/VirgilChunkCipher.cxx +0 -0
  109. data/ext/native/src/lib/src/VirgilCipherBase.cxx +0 -0
  110. data/ext/native/src/lib/src/VirgilConfig.cxx +51 -0
  111. data/ext/native/src/lib/src/VirgilConfig.h.in +43 -1
  112. data/ext/native/src/lib/src/VirgilContentInfo.cxx +0 -0
  113. data/ext/native/src/lib/src/VirgilCryptoError.cxx +0 -0
  114. data/ext/native/src/lib/src/VirgilCustomParams.cxx +0 -0
  115. data/ext/native/src/lib/src/VirgilDataSink.cxx +0 -0
  116. data/ext/native/src/lib/src/VirgilHKDF.cxx +0 -0
  117. data/ext/native/src/lib/src/VirgilKeyPair.cxx +19 -0
  118. data/ext/native/src/lib/src/VirgilOID.h +0 -0
  119. data/ext/native/src/lib/src/VirgilPBKDF.cxx +0 -0
  120. data/ext/native/src/lib/src/VirgilSignerBase.cxx +0 -0
  121. data/ext/native/src/lib/src/VirgilStreamCipher.cxx +0 -0
  122. data/ext/native/src/lib/src/VirgilStreamSigner.cxx +0 -0
  123. data/ext/native/src/lib/src/VirgilSystemCryptoError.cxx +0 -0
  124. data/ext/native/src/lib/src/VirgilTagFilter.cxx +0 -0
  125. data/ext/native/src/lib/src/VirgilTagFilter.h +0 -0
  126. data/ext/native/src/lib/src/VirgilTinyCipher.cxx +0 -0
  127. data/ext/native/src/lib/src/VirgilVersion.cxx.in +0 -0
  128. data/ext/native/src/lib/src/mbedtls_context.h +0 -0
  129. data/ext/native/src/lib/src/mbedtls_context_policy_spec.h +0 -0
  130. data/ext/native/src/lib/src/mbedtls_type_utils.h +0 -0
  131. data/ext/native/src/lib/src/pfs/VirgilPFS.cxx +0 -0
  132. data/ext/native/src/lib/src/pfs/VirgilPFSEncryptedMessage.cxx +0 -0
  133. data/ext/native/src/lib/src/pfs/VirgilPFSInitiatorPrivateInfo.cxx +0 -0
  134. data/ext/native/src/lib/src/pfs/VirgilPFSInitiatorPublicInfo.cxx +0 -0
  135. data/ext/native/src/lib/src/pfs/VirgilPFSPrivateKey.cxx +0 -0
  136. data/ext/native/src/lib/src/pfs/VirgilPFSPublicKey.cxx +0 -0
  137. data/ext/native/src/lib/src/pfs/VirgilPFSResponderPrivateInfo.cxx +0 -0
  138. data/ext/native/src/lib/src/pfs/VirgilPFSResponderPublicInfo.cxx +0 -0
  139. data/ext/native/src/lib/src/pfs/VirgilPFSSession.cxx +0 -0
  140. data/ext/native/src/lib/src/primitive/VirgilOperationCipher.cxx +0 -0
  141. data/ext/native/src/lib/src/primitive/VirgilOperationDH.cxx +0 -0
  142. data/ext/native/src/lib/src/primitive/VirgilOperationHash.cxx +0 -0
  143. data/ext/native/src/lib/src/primitive/VirgilOperationKDF.cxx +0 -0
  144. data/ext/native/src/lib/src/primitive/VirgilOperationRandom.cxx +0 -0
  145. data/ext/native/src/lib/src/pythia/VirgilPythia.cxx +202 -0
  146. data/ext/native/src/lib/src/pythia/VirgilPythiaContext.cxx +116 -0
  147. data/ext/native/src/lib/src/pythia/VirgilPythiaError.cxx +58 -0
  148. data/ext/native/src/lib/src/pythia/virgil_pythia_c.cxx +129 -0
  149. data/ext/native/src/lib/src/stream/VirgilBytesDataSink.cxx +0 -0
  150. data/ext/native/src/lib/src/stream/VirgilBytesDataSource.cxx +0 -0
  151. data/ext/native/src/lib/src/utils.h +3 -2
  152. data/ext/native/src/libs_ext/mbedtls/configs/config.h +0 -0
  153. data/ext/native/src/libs_ext/mbedtls/configs/config_desktop.h +0 -0
  154. data/ext/native/src/libs_ext/mbedtls/mbedtls.cmake +0 -0
  155. data/ext/native/src/{cmake/cmake_args.cmake → libs_ext/pythia/pythia.cmake} +24 -28
  156. data/ext/native/src/libs_ext/rapidjson/rapidjson.cmake +0 -0
  157. data/ext/native/src/libs_ext/tinyformat/cmake/config.cmake.in +0 -0
  158. data/ext/native/src/libs_ext/tinyformat/tinyformat.cmake +0 -0
  159. data/ext/native/src/migration-2.0.md +0 -0
  160. data/ext/native/src/tests/CMakeLists.txt +0 -0
  161. data/ext/native/src/tests/catch.hpp +0 -0
  162. data/ext/native/src/tests/data/test_data_pfs_with_otc.json +0 -0
  163. data/ext/native/src/tests/data/test_data_pfs_without_otc.json +0 -0
  164. data/ext/native/src/tests/deterministic_keys.h +293 -0
  165. data/ext/native/src/tests/rsa_keys.h +229 -123
  166. data/ext/native/src/tests/test_asn1_writer.cxx +0 -0
  167. data/ext/native/src/tests/test_asymmetric_cipher.cxx +65 -0
  168. data/ext/native/src/tests/test_base64.cxx +0 -0
  169. data/ext/native/src/tests/test_byte_array_utils.cxx +0 -0
  170. data/ext/native/src/tests/test_chunk_cipher.cxx +0 -0
  171. data/ext/native/src/tests/test_cipher.cxx +8 -4
  172. data/ext/native/src/tests/test_cipher_base.cxx +0 -0
  173. data/ext/native/src/tests/test_contract_copy_move.cxx +4 -1
  174. data/ext/native/src/tests/test_data_pfs.h +0 -0
  175. data/ext/native/src/tests/test_hash.cxx +0 -0
  176. data/ext/native/src/tests/test_hkdf.cxx +0 -0
  177. data/ext/native/src/tests/test_key_pair.cxx +65 -3
  178. data/ext/native/src/tests/test_pbe.cxx +0 -0
  179. data/ext/native/src/tests/test_pbkdf.cxx +0 -0
  180. data/ext/native/src/tests/test_pfs.cxx +0 -0
  181. data/ext/native/src/tests/test_pythia.cxx +157 -0
  182. data/ext/native/src/tests/test_random.cxx +0 -0
  183. data/ext/native/src/tests/test_runner.cxx +0 -0
  184. data/ext/native/src/tests/test_signer.cxx +0 -0
  185. data/ext/native/src/tests/test_stream_cipher.cxx +0 -0
  186. data/ext/native/src/tests/test_stream_data_source.cxx +0 -0
  187. data/ext/native/src/tests/test_symmetric_cipher.cxx +0 -0
  188. data/ext/native/src/tests/test_tag_filter.cxx +0 -0
  189. data/ext/native/src/tests/test_tiny_cipher.cxx +0 -0
  190. data/ext/native/src/utils/build.bat +0 -0
  191. data/ext/native/src/utils/build.sh +238 -68
  192. data/ext/native/src/utils/zip.vbs +0 -0
  193. data/ext/native/src/virgil-crypto.sublime-project +15 -0
  194. data/ext/native/src/wrappers/asmjs/CMakeLists.txt +0 -8
  195. data/ext/native/src/wrappers/emsdk/CMakeLists.txt +2 -2
  196. data/ext/native/src/wrappers/emsdk/error.js +0 -0
  197. data/ext/native/src/wrappers/emsdk/example.html +152 -31
  198. data/ext/native/src/wrappers/emsdk/helpers.js +140 -135
  199. data/ext/native/src/wrappers/emsdk/patch_embind.pl +0 -0
  200. data/ext/native/src/wrappers/emsdk/wrapper.cxx +55 -0
  201. data/ext/native/src/wrappers/go/CMakeLists.txt +6 -5
  202. data/ext/native/src/wrappers/java/CMakeLists.txt +27 -4
  203. data/ext/native/src/wrappers/java/src/JniLoader.java +167 -0
  204. data/ext/native/src/wrappers/java/src/VirgilStreamDataSink.java +0 -0
  205. data/ext/native/src/wrappers/java/src/VirgilStreamDataSource.java +0 -0
  206. data/ext/native/src/wrappers/net/CMakeLists.txt +41 -8
  207. data/ext/native/src/wrappers/net/cmake/UseCSharp.cmake +5 -5
  208. data/ext/native/src/wrappers/net/src/VirgilStreamDataSink.cs +0 -0
  209. data/ext/native/src/wrappers/net/src/VirgilStreamDataSource.cs +0 -0
  210. data/ext/native/src/wrappers/nodejs/checksum.txt +66 -0
  211. data/ext/native/src/wrappers/php/CMakeLists.txt +2 -5
  212. data/ext/native/src/wrappers/php/tests/CMakeLists.txt +6 -0
  213. data/ext/native/src/wrappers/php/tests/VirgilChunkCipher_Test.php.in +0 -0
  214. data/ext/native/src/wrappers/php/tests/VirgilCustomParams_Test.php.in +0 -0
  215. data/ext/native/src/wrappers/php/tests/VirgilKDF_Test.php.in +0 -0
  216. data/ext/native/src/wrappers/php/tests/VirgilPBE_Test.php.in +0 -0
  217. data/ext/native/src/wrappers/php/tests/VirgilPBKDF_Test.php.in +0 -0
  218. data/ext/native/src/wrappers/php/tests/VirgilPythia_Test.php.in +87 -0
  219. data/ext/native/src/wrappers/php/tests/VirgilStreamCipher_Test.php.in +0 -0
  220. data/ext/native/src/wrappers/php/tests/VirgilStreamSigner_Test.php.in +0 -0
  221. data/ext/native/src/wrappers/php/tests/VirgilVersion_Test.php.in +0 -0
  222. data/ext/native/src/wrappers/python/CMakeLists.txt +4 -1
  223. data/ext/native/src/wrappers/ruby/CMakeLists.txt +4 -1
  224. data/ext/native/src/wrappers/swig/common.i +0 -0
  225. data/ext/native/src/wrappers/swig/csharp/FixedArray.i +0 -0
  226. data/ext/native/src/wrappers/swig/csharp/VirgilByteArray.i +0 -0
  227. data/ext/native/src/wrappers/swig/csharp/common.i +0 -0
  228. data/ext/native/src/wrappers/swig/csharp/csharphead.swg.in +0 -0
  229. data/ext/native/src/wrappers/swig/go/common.i.in +7 -0
  230. data/ext/native/src/wrappers/swig/java/VirgilByteArray.i +0 -0
  231. data/ext/native/src/wrappers/swig/java/common.i +6 -0
  232. data/ext/native/src/wrappers/swig/php/common.i +0 -0
  233. data/ext/native/src/wrappers/swig/php/php7/VirgilByteArray.i +0 -0
  234. data/ext/native/src/wrappers/swig/util.i +0 -0
  235. data/ext/native/src/wrappers/swig/wrapper.i.in +18 -7
  236. data/ext/native/src/wrappers/webasm/CMakeLists.txt +0 -8
  237. data/ext/rakefile.rb +77 -56
  238. data/lib/virgil/crypto.rb +53 -9
  239. data/lib/virgil/crypto/access_token_signer.rb +79 -0
  240. data/lib/virgil/crypto/bytes.rb +81 -17
  241. data/lib/virgil/crypto/card_crypto.rb +115 -0
  242. data/lib/virgil/crypto/crypto_exception.rb +40 -0
  243. data/lib/virgil/crypto/hash_algorithm.rb +82 -0
  244. data/lib/virgil/crypto/key_pair.rb +41 -0
  245. data/lib/virgil/crypto/key_pair_type.rb +98 -0
  246. data/lib/virgil/crypto/private_key.rb +40 -0
  247. data/lib/virgil/crypto/private_key_exporter.rb +67 -0
  248. data/lib/virgil/crypto/public_key.rb +40 -0
  249. data/lib/virgil/crypto/{virgil_stream_data_sink.rb → stream_data_sink.rb} +12 -12
  250. data/lib/virgil/crypto/{virgil_stream_data_source.rb → stream_data_source.rb} +12 -12
  251. data/lib/virgil/crypto/validation.rb +59 -0
  252. data/lib/virgil/crypto/version.rb +35 -1
  253. data/lib/virgil/crypto/virgil_crypto.rb +595 -0
  254. data/lib/virgil/native_crypto.rb +80 -60
  255. data/lib/virgil/os.rb +40 -6
  256. data/secrets.tar.enc +0 -0
  257. data/virgil-crypto.gemspec +6 -7
  258. metadata +62 -12
  259. data/ext/native/src/cmake/android.toolchain.cmake +0 -1697
@@ -1,11 +1,123 @@
1
1
  virgil ChangeLog (Sorted per date)
2
2
 
3
+ = Version 2.4.5 released 2018-05-30
4
+
5
+ ## Changes
6
+
7
+ * [Build] Redesign 'build.sh' argument parsing - use key-value arguments instead of positional arguments
8
+
9
+ ## Features
10
+
11
+ * [JS] Add builds with Pythia for platforms: AsmJS and Webasm - now distributed as separate bundles
12
+
13
+
14
+ = Version 2.4.4 released 2018-05-17
15
+
16
+ ## Bugfix
17
+
18
+ * [Lib] Add missed Pythia headers to the all-in-one header
19
+
20
+ ## Features
21
+
22
+ * [Apple] Enable Pythia for platforms: WatchOS MacOS TVOS
23
+ * [Apple] Add 'module.modulemap' for Apple frameworks
24
+ * [JS] Add support for nodejs-10.1.0
25
+ * [Java] Add automatic loading of the JNI native library
26
+
27
+ ## Changes
28
+
29
+ * [Lib] Add restriction on the 'keyMaterial' length for deterministic key generation algorithms (at least 32 bytes)
30
+ * [Java] Downgrade target Java to 1.7
31
+ * [JS] Disable Pythia for platfroms: AsmJS and Webasm
32
+ * [JS] Update nodejs version: 4.8.7 -> 4.9.1'
33
+ * [JS] Update nodejs version: 6.13.0 -> 6.14.2'
34
+ * [JS] Update nodejs version: 8.9.4 -> 8.11.2'
35
+ * [JS] Update nodejs version: 9.5.0 -> 9.11.1'
36
+
37
+
38
+ = Version 2.4.3 released 2018-05-08
39
+
40
+ ## Features
41
+
42
+ * [FEATURE] Add support of PHP-7.2
43
+
44
+
45
+ ## Bugfix
46
+
47
+ * [Build] Force install 'pythia' libraries to the 'lib' directory
48
+ * [Build] Fix passing 'multi-thread' flag to the 'pythia' library
49
+ * [Build] Fix Golang CGO produce error message on the CentOS about duplication of `pythia_buf_new()' function.
50
+
51
+
52
+ = Version 2.4.2 released 2018-05-03
53
+
54
+ ## Changes
55
+
56
+ * [Build] Use 'lib' for CMake 'INSTALL_LIB_DIR_NAME' option by default - regression fix
57
+
58
+
59
+ = Version 2.4.1 released 2018-05-03
60
+
61
+ ## Changes
62
+
63
+ * [Docker] Update Go version & enable Pythia
64
+ * [CI] Add build of Golang binaries on Jenkins and publish thme to CDN
65
+
66
+
67
+ = Version 2.4.0 released 2018-05-03
68
+
69
+ ## Features
70
+
71
+ * [Lib] Add experimental feature - Pythia algorithm
72
+ * [Lib] Add experimental feature - deterministic Key Pair generation
73
+ * [Lib] Add ability to make runtime check of VirgilConfig
74
+
75
+ ## Changes
76
+
77
+ * [Build] Replace ad-hoc android.toolchaon.cmake file with file from NDK
78
+ * [Build] Replace deprecated CMake functions swig_add_module -> swig_add_library
79
+ * [Build] Take default install directory names from GNUInstallDirs
80
+ * [CI] Change Android NDK in the Jenkinsfile to version r16b
81
+ * [iOS] Change minimum supported iOS version to 9.0
82
+ * [JS] Always generate signle file in browser js builds to make bundling easier
83
+ * [JS] Export JS library as UMD module in web browsers
84
+
85
+ ## Bugfix
86
+
87
+ * [.NET] Fix binaries for .NET iOS, WatchOS and TvOS
88
+ * [.NET] Fix interoperating with unmanaged code in .NET Android
89
+ * [Golang] Fix Golang build with CMake 3.11
90
+
91
+
92
+ = Version 2.3.2 released 2018-04-11
93
+
94
+ ## Bugfix
95
+
96
+ * [CI] Fix and extend docs publishing
97
+
98
+
99
+ = Version 2.3.1 released 2018-04-10
100
+
101
+ ## Features
102
+
103
+ * [.NET] Add suport for .net-core Linux, Mac, Windows
104
+
105
+ ## Changes
106
+
107
+ * [CI] Update Dockerfile_Golang with cmake 3.10.2 and virgil-cryoto go v5
108
+ * [DOC] Reviewed README.md
109
+
110
+ ## Bugfix
111
+
112
+ * [Build] Fix 'missing extension' for C# assembly
113
+
114
+
3
115
  = Version 2.3.0 released 2018-02-19
4
116
 
5
117
  ## Bugfix
6
118
 
7
- * [Lib] Fix fail when export plain RSA 4096 private key to DER format
8
- * [CI] Fix Travis CI fails on a pull requests
119
+ * [Lib] Fix error when export plain RSA 4096 private key to DER format
120
+ * [CI] Fix Travis CI fails on a pull request
9
121
 
10
122
  ## Changes
11
123
 
@@ -7,18 +7,30 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
7
7
  libc6-dev \
8
8
  make \
9
9
  pkg-config \
10
- cmake \
11
10
  swig \
12
11
  doxygen \
13
12
  curl \
14
13
  ca-certificates \
15
14
  git \
15
+ wget \
16
+ libssl-dev \
16
17
  && rm -rf /var/lib/apt/lists/*
17
18
 
19
+ # install cmake
20
+ ENV CMAKE_VERSION 3.10.2
21
+ RUN wget https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}.tar.gz \
22
+ && tar xvfz cmake-${CMAKE_VERSION}.tar.gz \
23
+ && cd cmake-${CMAKE_VERSION} \
24
+ && ./bootstrap \
25
+ && make -j4 \
26
+ && make install \
27
+ && cd - \
28
+ && rm -rf ./cmake-*
29
+
18
30
  # install golang
19
- ENV GOLANG_VERSION 1.10
31
+ ENV GOLANG_VERSION 1.10.2
20
32
  ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
21
- ENV GOLANG_DOWNLOAD_SHA256 b5a64335f1490277b585832d1f6c7f8c6c11206cba5cd3f771dcb87b98ad1a33
33
+ ENV GOLANG_DOWNLOAD_SHA256 4b677d698c65370afa33757b6954ade60347aaca310ea92a63ed717d7cb0c2ff
22
34
 
23
35
  RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
24
36
  && echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \
@@ -33,9 +45,18 @@ WORKDIR $GOPATH
33
45
 
34
46
  # build virgil-crypto-go
35
47
  ADD . virgil-crypto
48
+
36
49
  RUN cd virgil-crypto \
37
- && cmake -H. -B_build -DCMAKE_INSTALL_PREFIX=_install -DLANG=go -DINSTALL_CORE_LIBS=ON \
38
- && cmake --build _build --target install \
39
- && go get -d gopkg.in/virgilsecurity/virgil-crypto-go.v4 \
40
- && cp -r _install/* $GOPATH/src/gopkg.in/virgilsecurity/virgil-crypto-go.v4 \
41
- && cd - && rm -rf virgil-crypto
50
+ && cmake -H. -B_build -DCMAKE_INSTALL_PREFIX=_install -DLANG=go -DINSTALL_CORE_LIBS=ON -DVIRGIL_CRYPTO_FEATURE_PYTHIA=ON \
51
+ && cmake --build _build --target install
52
+
53
+ # v4
54
+ RUN go get -d gopkg.in/virgilsecurity/virgil-crypto-go.v4 \
55
+ && cp -r virgil-crypto/_install/* $GOPATH/src/gopkg.in/virgilsecurity/virgil-crypto-go.v4
56
+
57
+ # v5
58
+ RUN go get -d gopkg.in/virgilsecurity/virgil-crypto-go.v5 \
59
+ && cp -r virgil-crypto/_install/* $GOPATH/src/gopkg.in/virgilsecurity/virgil-crypto-go.v5
60
+
61
+ # cleanup
62
+ RUN rm -rf virgil-crypto
@@ -39,72 +39,79 @@ def createNativeUnixBuild(slave) {
39
39
  clearContentUnix()
40
40
  unstash 'src'
41
41
  // C++
42
- sh './utils/build.sh cpp'
42
+ sh './utils/build.sh --target=cpp'
43
43
  // Ruby
44
44
  withEnv(["PATH=${env.HOME}/.rbenv/bin:${env.PATH}"]){
45
45
  writeFile file: './utils/env.sh', text: ['eval "$(rbenv init -)"'].join("\n")
46
46
  writeFile file: '.ruby-version', text: ['2.0.0-p648'].join("\n")
47
- sh './utils/build.sh ruby-2.0'
47
+ sh './utils/build.sh --target=ruby-2.0'
48
48
  writeFile file: '.ruby-version', text: ['2.2.6'].join("\n")
49
- sh './utils/build.sh ruby-2.2'
49
+ sh './utils/build.sh --target=ruby-2.2'
50
50
  writeFile file: '.ruby-version', text: ['2.3.3'].join("\n")
51
- sh './utils/build.sh ruby-2.3'
51
+ sh './utils/build.sh --target=ruby-2.3'
52
52
  writeFile file: '.ruby-version', text: ['2.4.0'].join("\n")
53
- sh './utils/build.sh ruby-2.4'
53
+ sh './utils/build.sh --target=ruby-2.4'
54
54
  }
55
55
  organizeFilesUnix('install/ruby')
56
56
  // Python
57
57
  if (slave.contains('centos7')) {
58
- sh './utils/build.sh python-2.7'
58
+ sh './utils/build.sh --target=python-2.7'
59
59
  writeFile file: './utils/env.sh', text: ['source /opt/rh/python33/enable', ''].join("\n")
60
- sh './utils/build.sh python-3.3'
60
+ sh './utils/build.sh --target=python-3.3'
61
61
  writeFile file: './utils/env.sh', text: ['source /opt/rh/rh-python34/enable', ''].join("\n")
62
- sh './utils/build.sh python-3.4'
62
+ sh './utils/build.sh --target=python-3.4'
63
63
  writeFile file: './utils/env.sh', text: ['source /opt/rh/rh-python35/enable', ''].join("\n")
64
- sh './utils/build.sh python-3.5'
64
+ sh './utils/build.sh --target=python-3.5'
65
65
  writeFile file: './utils/env.sh', text: ['source /opt/rh/rh-python36/enable', ''].join("\n")
66
- sh './utils/build.sh python-3.6'
66
+ sh './utils/build.sh --target=python-3.6'
67
67
  organizeFilesUnix('install/python')
68
68
  }
69
69
  if (slave.contains('build-os-x')) {
70
- sh './utils/build.sh python-2.7'
71
- sh './utils/build.sh python-3.4'
72
- sh './utils/build.sh python-3.5'
73
- sh './utils/build.sh python-3.6'
70
+ sh './utils/build.sh --target=python-2.7'
71
+ sh './utils/build.sh --target=python-3.4'
72
+ sh './utils/build.sh --target=python-3.5'
73
+ sh './utils/build.sh --target=python-3.6'
74
74
  organizeFilesUnix('install/python')
75
75
  }
76
76
  // Java
77
- sh './utils/build.sh java'
77
+ sh './utils/build.sh --target=java'
78
78
  // NodeJS
79
- sh './utils/build.sh nodejs-4.8.7'
80
- sh './utils/build.sh nodejs-6.13.0'
81
- sh './utils/build.sh nodejs-7.10.1'
82
- sh './utils/build.sh nodejs-8.9.4'
83
- sh './utils/build.sh nodejs-9.5.0'
79
+ sh './utils/build.sh --target=nodejs-4.9.1'
80
+ sh './utils/build.sh --target=nodejs-6.14.2'
81
+ sh './utils/build.sh --target=nodejs-7.10.1'
82
+ sh './utils/build.sh --target=nodejs-8.11.2'
83
+ sh './utils/build.sh --target=nodejs-9.11.1'
84
+ sh './utils/build.sh --target=nodejs-10.1.0'
84
85
  organizeFilesUnix('install/nodejs')
85
86
  // PHP
86
87
  if (slave.contains('os-x')) {
87
- def phpVersions = "php56 php70 php71"
88
- sh "brew unlink ${phpVersions} && brew link php56"
89
- sh "./utils/build.sh php-5.6"
90
- sh "brew unlink ${phpVersions} && brew link php70"
91
- sh "./utils/build.sh php-7.0"
92
- sh "brew unlink ${phpVersions} && brew link php71"
93
- sh "./utils/build.sh php-7.1"
88
+ def phpVersions = "php56 php70 php71 php72"
89
+ sh "brew unlink ${phpVersions} && brew link php56 --force"
90
+ sh "./utils/build.sh --target=php-5.6"
91
+ sh "brew unlink ${phpVersions} && brew link php70 --force"
92
+ sh "./utils/build.sh --target=php-7.0"
93
+ sh "brew unlink ${phpVersions} && brew link php71 --force"
94
+ sh "./utils/build.sh --target=php-7.1"
95
+ sh "brew unlink ${phpVersions} && brew link php72 --force"
96
+ sh "./utils/build.sh --target=php-7.2"
94
97
  organizeFilesUnix('install/php')
95
98
  }
96
99
  if (slave.contains('centos7')) {
97
100
  writeFile file: './utils/env.sh', text: ['source /opt/rh/rh-php56/enable', ''].join("\n")
98
- sh './utils/build.sh php-5.6'
101
+ sh './utils/build.sh --target=php-5.6'
99
102
  writeFile file: './utils/env.sh', text: ['source /opt/rh/rh-php70/enable', ''].join("\n")
100
- sh './utils/build.sh php-7.0'
103
+ sh './utils/build.sh --target=php-7.0'
101
104
  writeFile file: './utils/env.sh', text: ['source /opt/remi/php71/enable', ''].join("\n")
102
- sh './utils/build.sh php-7.1'
105
+ sh './utils/build.sh --target=php-7.1'
106
+ writeFile file: './utils/env.sh', text: ['source /opt/remi/php72/enable', 'source /opt/rh/devtoolset-4/enable', ''].join("\n")
107
+ sh './utils/build.sh --target=php-7.2'
103
108
  organizeFilesUnix('install/php')
104
109
  }
105
- //DotNET - Unix/Linux Mono
106
- if (! slave.contains('build-os-x')) {
107
- sh './utils/build.sh net'
110
+ // MONO NET
111
+ sh './utils/build.sh --target=net'
112
+ // Golang
113
+ if (slave.contains('centos7') || slave.contains('os-x')) {
114
+ sh './utils/build.sh --target=go'
108
115
  }
109
116
 
110
117
  archiveArtifacts('install/**')
@@ -122,11 +129,12 @@ def createNativeWindowsBuild(slave) {
122
129
  bat 'utils\\build.bat cpp'
123
130
  bat 'utils\\build.bat net'
124
131
  bat 'utils\\build.bat java'
125
- bat 'utils\\build.bat nodejs-4.8.7'
126
- bat 'utils\\build.bat nodejs-6.13.0'
132
+ bat 'utils\\build.bat nodejs-4.9.1'
133
+ bat 'utils\\build.bat nodejs-6.14.2'
127
134
  bat 'utils\\build.bat nodejs-7.10.1'
128
- bat 'utils\\build.bat nodejs-8.9.4'
129
- bat 'utils\\build.bat nodejs-9.5.0'
135
+ bat 'utils\\build.bat nodejs-8.11.2'
136
+ bat 'utils\\build.bat nodejs-9.11.1'
137
+ bat 'utils\\build.bat nodejs-10.1.0'
130
138
  withEnv(["PATH=C:\\Python27_x86;${env.PATH}"]) {
131
139
  bat 'utils\\build.bat python-2.7-x86'
132
140
  }
@@ -173,9 +181,13 @@ def createCrossplatfromBuild(slave) {
173
181
  clearContentUnix()
174
182
  unstash 'src'
175
183
  withEnv(['EMSDK_HOME=/Users/virgil/Library/VirgilEnviroment/emsdk_portable']) {
176
- sh './utils/build.sh asmjs . build/asmjs install/asmjs'
177
- sh './utils/build.sh webasm . build/webasm install/webasm'
184
+ sh './utils/build.sh --target=asmjs --build=build/asmjs/basic --install=install/asmjs/basic'
185
+ sh './utils/build.sh --target=asmjs --build=build/asmjs/pythia --install=install/asmjs/pythia --feature=pythia'
186
+ sh './utils/build.sh --target=webasm --build=build/webasm/basic --install=install/webasm/basic'
187
+ sh './utils/build.sh --target=webasm --build=build/webasm/pythia --install=install/webasm/pythia --feature=pythia'
178
188
  }
189
+ organizeFilesUnix('install/asmjs')
190
+ organizeFilesUnix('install/webasm')
179
191
  archiveArtifacts('install/**')
180
192
  }
181
193
  }
@@ -187,14 +199,13 @@ def createDarwinBuild(slave) {
187
199
  clearContentUnix()
188
200
  unstash 'src'
189
201
  sh 'rm -fr build install'
190
- sh './utils/build.sh macos . build/cpp/macos install/cpp/macos'
191
- sh './utils/build.sh ios . build/cpp/ios install/cpp/ios '
192
- sh './utils/build.sh watchos . build/cpp/watchos install/cpp/watchos'
193
- sh './utils/build.sh tvos . build/cpp/tvos install/cpp/tvos'
194
- sh './utils/build.sh net_macos . build/net/macos install/net/macos'
195
- sh './utils/build.sh net_ios . build/net/ios install/net/ios'
196
- sh './utils/build.sh net_watchos . build/net/watchos install/net/watchos'
197
- sh './utils/build.sh net_tvos . build/net/tvos install/net/tvos'
202
+ sh './utils/build.sh --target=macos --build=build/cpp/macos --install=install/cpp/macos'
203
+ sh './utils/build.sh --target=ios --build=build/cpp/ios --install=install/cpp/ios '
204
+ sh './utils/build.sh --target=watchos --build=build/cpp/watchos --install=install/cpp/watchos'
205
+ sh './utils/build.sh --target=tvos --build=build/cpp/tvos --install=install/cpp/tvos'
206
+ sh './utils/build.sh --target=net_ios --build=build/net/ios --install=install/net/ios'
207
+ sh './utils/build.sh --target=net_watchos --build=build/net/watchos --install=install/net/watchos'
208
+ sh './utils/build.sh --target=net_tvos --build=build/net/tvos --install=install/net/tvos'
198
209
  organizeFilesUnix('install/cpp')
199
210
  organizeFilesUnix('install/net')
200
211
  archiveArtifacts('install/**')
@@ -207,9 +218,9 @@ def createAndroidBuild(slave) {
207
218
  node(slave) {
208
219
  clearContentUnix()
209
220
  unstash 'src'
210
- withEnv(['ANDROID_NDK=/Users/virgil/Library/VirgilEnviroment/android-ndk']) {
211
- sh './utils/build.sh java_android . build/java/android install/java/android'
212
- sh './utils/build.sh net_android . build/net/android install/net/android'
221
+ withEnv(['ANDROID_NDK=/Users/virgil/Library/VirgilEnviroment/android-ndk-r16b']) {
222
+ sh './utils/build.sh --target=java_android --build=build/java/android --install=install/java/android'
223
+ sh './utils/build.sh --target=net_android --build=build/net/android --install=install/net/android'
213
224
  }
214
225
  organizeFilesUnix('install/java')
215
226
  organizeFilesUnix('install/net')
File without changes
@@ -1,82 +1,82 @@
1
1
  [![Build Status](https://travis-ci.org/VirgilSecurity/virgil-crypto.svg?branch=master)](https://travis-ci.org/VirgilSecurity/virgil-crypto)
2
2
  [![GitHub license](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg)](https://raw.githubusercontent.com/VirgilSecurity/virgil-crypto/master/LICENSE)
3
3
  [![Documentation Developers](https://img.shields.io/badge/docs-developers-green.svg)](https://developer.virgilsecurity.com)
4
- [![Documentation Doxygen](https://img.shields.io/badge/docs-doxygen-blue.svg)](http://VirgilSecurity.github.io/virgil-crypto)
5
- [![Coverity Scan Build Status](https://scan.coverity.com/projects/4943/badge.svg)](https://scan.coverity.com/projects/virgilsecurity-virgil-crypto)
4
+
6
5
 
7
6
  # Library: Virgil Crypto
8
7
 
9
- - [Introduction](#introduction)
10
- - [Supported languages and platforms](#supported-languages-and-platforms)
11
- - [Library purposes](#library-purposes)
12
- - [Where library can be used](#where-library-can-be-used)
13
- - [Supported keys](#supported-keys)
14
- - [Build prerequisites](#build-prerequisites)
15
- - [Simple build](#simple-build)
16
- - [Multiarch build](#multiarch-build)
17
- - [Support](#support)
8
+ [Library features](#library-features) | [Supported algorithms](#supported-algorithms) | [Build](#build) | [Benchmark](#benchmark) | [Docs](#docs) | [Support](#support)
18
9
 
19
10
  ## Introduction
20
- Welcome to Virgil!
11
+ Welcome to Virgil Security!
21
12
 
22
- Virgil is a stack of security libraries (ECIES with Crypto Agility wrapped in Virgil Cryptogram) and all the necessary
23
- infrastructure to enable seamless, end-to-end encryption for any application, platform or device.
24
- See below for currently available languages and platforms.
25
- Get in touch with us to get preview access to our key infrastructure.
13
+ Virgil Security guides software developers into the forthcoming security world in which everything will be encrypted (and passwords will be eliminated). In this world, the days of developers having to raise millions of dollars to build a secure chat, secure email, secure file-sharing, or a secure anything have come to an end. Now developers can instead focus on building features that give them a competitive market advantage while end-users can enjoy the privacy and security they increasingly demand.
26
14
 
27
- Virgil Security, Inc., guides software developers into the forthcoming security world in which everything will be encrypted (and passwords will be eliminated). In this world, the days of developers having to raise millions of dollars to build a secure chat, secure email, secure file-sharing, or a secure anything have come to an end. Now developers can instead focus on building features that give them a competitive market advantage while end-users can enjoy the privacy and security they increasingly demand.
15
+ Virgil Security offers this security via a stack of security libraries (ECIES with Crypto Agility wrapped in Virgil Cryptogram) and all the necessary infrastructure to enable seamless, end-to-end encryption for any application, platform or device. End-to-end encryption can be used for a variety of important reasons: compliance with regulations like HIPAA and GDPR, the transfer and storage of PII, general user privacy as a feature, breach risk mitigation and more.
16
+ Virgil Crypto also has all required cryptographic functions and primitives to perform an implementation of [Pythia](http://pages.cs.wisc.edu/~ace/papers/pythia-full.pdf) technology.
28
17
 
29
- ## Supported languages and platforms
18
+ See below for currently available languages and platforms. Get in touch with us to get beta access to our Key infrastructure.
30
19
 
31
- | Language | Supported OS |
32
- |----------|----------------------------|
33
- | C++ | ANY |
34
- | PHP | Unix, Linux, OS X |
35
- | Python | Unix, Linux, OS X |
36
- | Ruby | Unix, Linux, OS X |
37
- | Java | Unix, Linux, OS X, Windows |
38
- | .NET | Unix, Linux, OS X, Windows |
39
- | AsmJS | Unix, Linux, OS X, Windows |
40
- | NodeJS | Unix, Linux, OS X, Windows |
20
+ ## Library Features
41
21
 
42
- ## Library purposes
22
+ ### Supported crypto operations
23
+ * Generate keys;
43
24
  * Encrypt data;
44
25
  * Decrypt data;
45
26
  * Sign data;
46
- * Verify data.
47
-
48
- ## Where library can be used
49
- * on the client-side application;
50
- * on the server-side application.
51
-
52
- ## Supported keys
53
-
54
- | Key Algorithm | Description | Notes |
55
- |-----------------|--------------------------------|------------------------|
56
- | RSA_256 | RSA 1024 bit | weak, not recommended |
57
- | RSA_512 | RSA 1024 bit | weak, not recommended |
58
- | RSA_1024 | RSA 1024 bit | weak, not recommended |
59
- | RSA_2048 | RSA 2048 bit | weak, not recommended |
60
- | RSA_3072 | RSA 3072 bit | |
61
- | RSA_4096 | RSA 4096 bit | |
62
- | RSA_8192 | RSA 8192 bit | |
63
- | EC_SECP192R1 | 192-bits NIST curve | |
64
- | EC_SECP224R1 | 224-bits NIST curve | |
65
- | EC_SECP256R1 | 256-bits NIST curve | |
66
- | EC_SECP384R1 | 384-bits NIST curve | |
67
- | EC_SECP521R1 | 521-bits NIST curve | |
68
- | EC_BP256R1 | 256-bits Brainpool curve | |
69
- | EC_BP384R1 | 384-bits Brainpool curve | |
70
- | EC_BP512R1 | 512-bits Brainpool curve | |
71
- | EC_SECP192K1 | 192-bits "Koblitz" curve | |
72
- | EC_SECP224K1 | 224-bits "Koblitz" curve | |
73
- | EC_SECP256K1 | 256-bits "Koblitz" curve | |
74
- | EC_CURVE25519 | Curve25519 (deprecated format) | deprecated |
75
- | FAST_EC_X25519 | Curve25519 | only encrypt / decrypt |
76
- | FAST_EC_ED25519 | Ed25519 | recommended, default |
77
-
78
-
79
- ## Build prerequisites
27
+ * Verify data;
28
+ * Pythia protocol.
29
+
30
+ ### Supported platforms
31
+ Crypto Library is suitable for the following platforms:
32
+ * Desktop (Windows, Linux, MacOS);
33
+ * Mobile (iOS, Android, watchOS, tvOS);
34
+ * Web (WebAssembly, AsmJS)
35
+
36
+ ### Supported languages
37
+ Crypto Library is written in C++ [[CDN](https://cdn.virgilsecurity.com/virgil-crypto/cpp/)] and supports bindings for the following programming languages:
38
+ * Go [[CDN](https://cdn.virgilsecurity.com/virgil-crypto/go/)]
39
+ * PHP [[CDN](https://cdn.virgilsecurity.com/virgil-crypto/php/)]
40
+ * Python [[CDN](https://cdn.virgilsecurity.com/virgil-crypto/python/)]
41
+ * Ruby [[CDN](https://cdn.virgilsecurity.com/virgil-crypto/ruby/)]
42
+ * Java [[CDN](https://cdn.virgilsecurity.com/virgil-crypto/java/)]
43
+ * C# [[CDN](https://cdn.virgilsecurity.com/virgil-crypto/net/)]
44
+ * AsmJS [[CDN](https://cdn.virgilsecurity.com/virgil-crypto/asmjs/)]
45
+ * NodeJS [[CDN](https://cdn.virgilsecurity.com/virgil-crypto/nodejs/)]
46
+ * WebAssembly [[CDN](https://cdn.virgilsecurity.com/virgil-crypto/webasm/)]
47
+
48
+ **Swift/Objective_C** language can use the Virgil Crypto Library directly, without any bind.
49
+
50
+ ### Available Wrappers
51
+ Virgil also has special wrappers for simplifying Crypto Library implementation in your digital solutions. We support wrappers for the following programming languages:
52
+ * [Go](https://github.com/VirgilSecurity/virgil-crypto-go)
53
+ * [Objective-C/Swift](https://github.com/VirgilSecurity/virgil-foundation-x)
54
+ * [C#/.NET](https://github.com/VirgilSecurity/virgil-sdk-crypto-net)
55
+ * [Ruby](https://github.com/VirgilSecurity/virgil-crypto-ruby)
56
+ * [Python](https://github.com/VirgilSecurity/virgil-crypto-python)
57
+ * [PHP](https://github.com/VirgilSecurity/virgil-sdk-crypto-php)
58
+ * [JS](https://github.com/VirgilSecurity/virgil-crypto-javascript)
59
+
60
+
61
+ ## Supported algorithms
62
+
63
+
64
+ | Purpose | Algorithm, Source |
65
+ |----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
66
+ | Key Generation, PRNG | [NIST SP 800-90A](http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-90Ar1.pdf) |
67
+ | Key Derivation | [KDF2\*](https://www.ietf.org/rfc/rfc2898),<br> [HKDF](https://tools.ietf.org/html/rfc5869) |
68
+ | Key Exchange | [X25519\*](https://tools.ietf.org/html/rfc7748),<br> [ECDH](http://csrc.nist.gov/groups/ST/toolkit/documents/SP800-56Arev1_3-8-07.pdf),<br> [RSA](http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Br1.pdf) |
69
+ | Hashing | [SHA-2 (256/384\*/512)](https://tools.ietf.org/html/rfc4634),<br> [Blake2](https://tools.ietf.org/html/rfc7693) |
70
+ | Digital Signature | [Ed25519\*](https://tools.ietf.org/html/rfc8032),<br> [ECDSA](http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf),<br> [RSASSA-PSS](https://tools.ietf.org/html/rfc4056) |
71
+ | Entropy Source | Linux [/dev/urandom](https://tls.mbed.org/module-level-design-rng),<br> Windows [CryptGenRandom()](https://tls.mbed.org/module-level-design-rng) |
72
+ | Symmetric Algorithms | [AES GCM\*](http://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf),<br> [AES CBC](https://tools.ietf.org/html/rfc3602) |
73
+ | Elliptic Curves | [X25519](https://tools.ietf.org/html/rfc7748),<br> [Ed25519\*](https://tools.ietf.org/html/rfc8032),<br> [Koblitz](https://www.ietf.org/rfc/rfc4492) (secp192k1, secp224k1, secp256k1),<br> [Brainpool](https://tools.ietf.org/html/rfc5639) (bp256r1, bp384r1, bp512r1), <br> [NIST](https://www.ietf.org/rfc/rfc5480.txt) (secp256r1, secp192r1, secp224r1, secp384r1, secp521r1) |
74
+
75
+ > **\*** - used by default.
76
+
77
+ ## Build
78
+
79
+ ### Prerequisites
80
80
 
81
81
  The page lists the prerequisite packages which need to be installed on the different platforms to be able to configure and to build Virgil Crypto Library.
82
82
 
@@ -89,135 +89,105 @@ The page lists the prerequisite packages which need to be installed on the diffe
89
89
  - ```make```
90
90
  * Other tools:
91
91
  - ```git```
92
- - ```swig``` (version >= 3.0.7), optional for C++ build
92
+ - ```swig``` (version >= 3.0.12), optional for C++ build
93
93
  - ```doxygen``` (optional)
94
94
 
95
95
 
96
- ## Simple build
97
-
98
- This section describes how to build Virgil Crypto Library for а particular language.
99
-
100
- ### Step 1 - Choose target language
101
-
102
- <a name="table1"></a>
103
- Table 1 - Supported languages
104
-
105
- | Language | Supported OS | Dependencies | Build parameters | Environment | Binary |
106
- |----------|------------------------------|-----------------------|------------------|-------------|-------------------------------------------------------------|
107
- | C++ | ANY | | LANG=cpp | | [CDN](https://cdn.virgilsecurity.com/virgil-crypto/cpp/) |
108
- | PHP | Unix, Linux, OS X | php, php5-dev | LANG=php | | [CDN](https://cdn.virgilsecurity.com/virgil-crypto/php/) |
109
- | Python | Unix, Linux, OS X | python | LANG=python | | [CDN](https://cdn.virgilsecurity.com/virgil-crypto/python/) |
110
- | Ruby | Unix, Linux, OS X | ruby, ruby-dev | LANG=ruby | | [CDN](https://cdn.virgilsecurity.com/virgil-crypto/ruby/) |
111
- | Java | Unix, Linux, OS X, Windows\* | Java JDK 1.6 | LANG=java | JAVA_HOME | [CDN](https://cdn.virgilsecurity.com/virgil-crypto/java/) |
112
- | .NET | Unix, Linux, OS X, Windows\* | .NET 2.0, or mono 2.0 | LANG=net | | [CDN](https://cdn.virgilsecurity.com/virgil-crypto/net/) |
113
- | AsmJS | Unix, Linux, OS X, Windows\* | Emscripten 1.35 | LANG=asmjs | EMSDK_HOME | [CDN](https://cdn.virgilsecurity.com/virgil-crypto/asmjs/) |
114
- | NodeJS | Unix, Linux, OS X, Windows\* | | LANG=nodejs | | [CDN](https://cdn.virgilsecurity.com/virgil-crypto/nodejs/) |
115
-
116
- >\* External dependencies for Windows binaries:
117
- > - msvcp140.dll
118
- > - vcruntime140.dll
119
-
120
- >These dependencies can be installed as a part of [Visual C++ Redistributable for Visual Studio 2015](https://www.microsoft.com/en-us/download/details.aspx?id=48145)
96
+ ### Build the Library
97
+ This section describes how to build Virgil Crypto Library for а particular OS.
121
98
 
122
- ### Step 2 - Configure environment
123
-
124
- 1. Open Terminal.
125
- 1. Check that all the tools which are listed in the [build prerequisite](#build-prerequisite) are available there.
126
- 1. Set environment variables according to the [table above](#table1).
127
-
128
- ### Step 3 - Get source code
99
+ #### Step 1 - Get source code
129
100
 
101
+ - Open Terminal.
102
+ - Get the source code:
130
103
  ```shell
131
104
  > git clone https://github.com/VirgilSecurity/virgil-crypto.git
132
105
  ```
133
106
 
134
- ### Step 4 - Build
135
107
 
136
- Replace ```{{LANG}}``` placeholder to the corresponding value from the [table above](#table1).
108
+ #### Step 2 - Run a build Script
109
+
110
+ Unix-like OS:
137
111
 
138
112
  ```shell
139
113
  > cd virgil-crypto
140
- > cmake -H. -B_build -DCMAKE_INSTALL_PREFIX=_install -DLANG={{LANG}}
141
- > cmake --build _build --target install
114
+ > ./utils/build.sh
142
115
  ```
143
116
 
144
- > Note, if you are using ```-DLANG=nodejs```, one of the next parameters can be appended:
145
- >
146
- > * ```-DLANG_VERSION=0.12.7```
147
- > * ```-DLANG_VERSION=4.1.0```
148
-
149
- ## Multiarch build
150
-
151
- This section describes how to build Virgil Crypto Library for multi architecture targets, which are packed inside the specific package:
152
-
153
- * Apple OS X Framework
154
- * Apple iOS Framework
155
- * Apple WatchOS Framework
156
- * Apple TVOS Framework
157
- * Android Bundle as Jar archive
158
- * Windows Bundle, as structured
159
-
160
- ### Step 1 - Choose target language and platform
161
-
162
- <a name="table2"></a>
163
- Table 2 - Supported languages and platforms
164
-
165
- | Language | Platform | Host OS | Dependencies | Build parameters | Environment |
166
- |-------------|----------|---------|----------------------------------------------|--------------------------|-------------|
167
- | C++ | OS X | OS X | | TARGET=osx | |
168
- | C++ | iOS | OS X | | TARGET=ios | |
169
- | C++ | WatchOS | OS X | | TARGET=applewatchos | |
170
- | C++ | TVOS | OS X | | TARGET=appletvos | |
171
- | C++ | Windows | Windows | msvcp140.dll\*, vcruntime140.dll\* | TARGET=cpp | |
172
- | .NET | iOS | OS X | mono 2.0 | TARGET=net_ios | |
173
- | .NET | WatchOS | OS X | mono 2.0 | TARGET= net_applewatchos | |
174
- | .NET | TVOS | OS X | mono 2.0 | TARGET=net_appletvos | |
175
- | .NET | Android | *nix | Android NDK, mono 2.0 | TARGET=net_android | ANDROID_NDK |
176
- | .NET | Windows | Windows | .NET 2.0, msvcp140.dll\*, vcruntime140.dll\* | TARGET=net | |
177
- | Java | Android | *nix | Android NDK | TARGET=java_android | ANDROID_NDK |
178
- | Java | Windows | Windows | Java JDK, msvcp140.dll\*, vcruntime140.dll\* | TARGET=java | JAVA_HOME |
179
- | NodeJS 0.12 | Windows | Windows | msvcp140.dll\*, vcruntime140.dll\* | TARGET=nodejs-0.12.7 | |
180
- | NodeJS 4.1 | Windows | Windows | msvcp140.dll\*, vcruntime140.dll\* | TARGET=nodejs-4.1.0 | |
181
-
182
- >These dependencies can be installed as a part of [Visual C++ Redistributable for Visual Studio 2015](https://www.microsoft.com/en-us/download/details.aspx?id=48145)
183
-
184
- ### Step 2 - Configure environment
185
-
186
- 1. Open Terminal.
187
- 1. Check that all tools which are listed in the [build prerequisites](#build-prerequisites) are available there.
188
- * for Windows compiler should be MSVC;
189
- * for OS X build toolchain should be Xcode Toolchain.
190
- 1. Check that all dependencies from the [table above](#table2) are accessible.
191
- 1. Set environment variables according to the [table above](#table2).
192
-
193
- ### Step 3 - Get source code
117
+ Windows OS:
194
118
 
195
119
  ```shell
196
- > git clone https://github.com/VirgilSecurity/virgil-crypto.git
120
+ > cd virgil-crypto
121
+ > ./utils/build.bat
197
122
  ```
198
123
 
199
- ### Step 4 - Build
200
-
201
- Replace ```{{TARGET}}``` placeholder to the corresponding value from the [table above](#table2).
124
+ Run the build script with the option `-h` to get help on how to build a library for a necessary OS, Platforms or languages.
202
125
 
203
- Unix-like OS:
126
+ Build command has the following syntax:
204
127
 
205
128
  ```shell
206
- > cd virgil-crypto
207
- > ./utils/build.sh {{TARGET}}
208
- > ls ./install/{{TARGET}}
129
+ ./utils/build.sh [--target=<target>] [--feature=<feature>] [--src=<src_dir>] [--build=<build_dir>] [--install=<install_dir>]
209
130
  ```
210
131
 
211
- Windows OS:
132
+ where the command options are:
133
+
134
+ - &lt;target&gt; - (default = cpp) target to build which contains two parts &lt;name&gt;[-&lt;version&gt;], where &lt;name&gt;:
135
+
136
+ | &lt;name&gt; | build information |
137
+ |------------------|---------------------------------------------------------------------------------|
138
+ | cpp | build C++ library |
139
+ | macos | build framework for Apple macOSX, requirements: OS X, Xcode |
140
+ | ios | build framework for Apple iOS, requirements: OS X, Xcode |
141
+ | watchos | build framework for Apple WatchOS, requirements: OS X, Xcode |
142
+ | tvos | build framework for Apple TVOS, requirements: OS X, Xcode |
143
+ | php | build PHP library, requirements: php-dev |
144
+ | python | build Python library |
145
+ | ruby | build Ruby library |
146
+ | java | build Java library, requirements: $JAVA_HOME |
147
+ | java_android | build Java library under Android platform, requirements: $ANDROID_NDK |
148
+ | net | build .NET library, requirements: .NET or Mono |
149
+ | net_macos | build .NET library under Apple macOSX platform, requirements: Mono, OS X, Xcode |
150
+ | net_ios | build .NET library under Apple iOS platform, requirements: Mono, OS X, Xcode |
151
+ | net_applewatchos | build .NET library under WatchOS platform, requirements: Mono, OS X, Xcode |
152
+ | net_appletvos | build .NET library under TVOS platform, requirements: Mono, OS X, Xcode |
153
+ | net_android | build .NET library under Android platform, requirements: Mono, $ANDROID_NDK |
154
+ | asmjs | build AsmJS library, requirements: $EMSDK_HOME |
155
+ | webasm | build WebAssembly library, requirements: $EMSDK_HOME |
156
+ | nodejs | build NodeJS module |
157
+ | go | build Golang library |
158
+
159
+ - &lt;feature&gt; - available features:
160
+ * pythia - ask to enable feature Pythia. Some targets enable this feature by default.
161
+ - &lt;src_dir&gt; - a path to the directory where a root CMakeLists.txt file is located (default = .).
162
+ - &lt;build_dir&gt; - a path to the directory where temp files will be stored (default = build/&lt;target&gt;).
163
+ - &lt;install_dir&gt; - a path to the directory where library files will be installed (default = install/&lt;target&gt;).
164
+
165
+
166
+ > All available Crypto Library versions you can find [here](http://virgilsecurity.github.io/virgil-crypto/).
167
+
168
+
169
+ ## Benchmark
170
+ You can find out benchmark of the Crypto Library in the [benchmark.md](benchmark.md) file.
171
+
172
+ ## Docs
173
+ We always try to make cryptography accessible for programmers, and the documentation below can get you started today.
174
+ * [Crypto Library API](http://virgilsecurity.github.io/virgil-crypto/)
175
+ * [Library usage examples](https://developer.virgilsecurity.com/docs/how-to#cryptography)
176
+ * [Generate a key pair](https://developer.virgilsecurity.com/docs/cs/how-to/cryptography/generate-keypair)
177
+ * [import and export keys](https://developer.virgilsecurity.com/docs/cs/how-to/cryptography/import-export-keys)
178
+ * [generate and verify signature](https://developer.virgilsecurity.com/docs/cs/how-to/cryptography/generate-verify-signature)
179
+ * [encrypt and decrypt data](https://developer.virgilsecurity.com/docs/cs/how-to/cryptography/encrypt-decrypt-data)
180
+ * [Virgil CLI for the Crypto Library](https://developer.virgilsecurity.com/docs/sdk-and-tools/virgil-cli/generate-keypair)
212
181
 
213
- ```shell
214
- > set MSVC_ROOT=c:\path\to\msvc\root
215
- > set JAVA_HOME=c:\path\to\jdk
216
- > cd virgil-crypto
217
- > .\utils\build.bat {{TARGET}}
218
- > dir .\install\{{TARGET}}
219
- ```
220
182
 
221
183
 
222
184
  ## Support
223
- Email to: <support@VirgilSecurity.com>
185
+ Our developer support team is here to help you.
186
+
187
+ You can find us on [Twitter](https://twitter.com/VirgilSecurity) or send us email support@VirgilSecurity.com.
188
+
189
+ Also, get extra help from our support team on [Slack](https://join.slack.com/t/VirgilSecurity/shared_invite/enQtMjg4MDE4ODM3ODA4LTc2OWQwOTQ3YjNhNTQ0ZjJiZDc2NjkzYjYxNTI0YzhmNTY2ZDliMGJjYWQ5YmZiOGU5ZWEzNmJiMWZhYWVmYTM).
190
+
191
+ ## License
192
+
193
+ BSD 3-Clause. See [LICENSE](LICENSE) for details.