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
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Copyright (C) 2015-2018 Virgil Security Inc.
3
+ *
4
+ * All rights reserved.
5
+ *
6
+ * Redistribution and use in source and binary forms, with or without
7
+ * modification, are permitted provided that the following conditions are
8
+ * met:
9
+ *
10
+ * (1) Redistributions of source code must retain the above copyright
11
+ * notice, this list of conditions and the following disclaimer.
12
+ *
13
+ * (2) Redistributions in binary form must reproduce the above copyright
14
+ * notice, this list of conditions and the following disclaimer in
15
+ * the documentation and/or other materials provided with the
16
+ * distribution.
17
+ *
18
+ * (3) Neither the name of the copyright holder nor the names of its
19
+ * contributors may be used to endorse or promote products derived from
20
+ * this software without specific prior written permission.
21
+ *
22
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR
23
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
26
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
30
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
31
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32
+ * POSSIBILITY OF SUCH DAMAGE.
33
+ *
34
+ * Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com>
35
+ */
36
+
37
+ #include <virgil/crypto/pythia/VirgilPythiaError.h>
38
+
39
+ #include <array>
40
+ #include <mbedtls/error.h>
41
+
42
+ using virgil::crypto::pythia::VirgilPythiaErrorCategory;
43
+
44
+
45
+ const VirgilPythiaErrorCategory& virgil::crypto::pythia::pythia_error_category() noexcept {
46
+ static VirgilPythiaErrorCategory inst;
47
+ return inst;
48
+ }
49
+
50
+ const char* VirgilPythiaErrorCategory::name() const noexcept {
51
+ return "virgil/crypto/pythia";
52
+ }
53
+
54
+ std::string VirgilPythiaErrorCategory::message(int ev) const noexcept {
55
+ return std::string(
56
+ "Pythia library has return error. This is unexpected behaviour, please contact "
57
+ "support team.");
58
+ }
@@ -0,0 +1,129 @@
1
+ /**
2
+ * Copyright (C) 2015-2018 Virgil Security Inc.
3
+ *
4
+ * All rights reserved.
5
+ *
6
+ * Redistribution and use in source and binary forms, with or without
7
+ * modification, are permitted provided that the following conditions are
8
+ * met:
9
+ *
10
+ * (1) Redistributions of source code must retain the above copyright
11
+ * notice, this list of conditions and the following disclaimer.
12
+ *
13
+ * (2) Redistributions in binary form must reproduce the above copyright
14
+ * notice, this list of conditions and the following disclaimer in
15
+ * the documentation and/or other materials provided with the
16
+ * distribution.
17
+ *
18
+ * (3) Neither the name of the copyright holder nor the names of its
19
+ * contributors may be used to endorse or promote products derived from
20
+ * this software without specific prior written permission.
21
+ *
22
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR
23
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
26
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
30
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
31
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32
+ * POSSIBILITY OF SUCH DAMAGE.
33
+ *
34
+ * Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com>
35
+ */
36
+
37
+ #if VIRGIL_CRYPTO_FEATURE_PYTHIA
38
+
39
+ #include <virgil/crypto/pythia/virgil_pythia_c.h>
40
+
41
+ #include <virgil/crypto/pythia/VirgilPythiaContext.h>
42
+
43
+ #include <pythia/pythia_wrapper.h>
44
+
45
+ using virgil::crypto::pythia::VirgilPythiaContext;
46
+
47
+
48
+ int virgil_pythia_blind(
49
+ const pythia_buf_t* password, pythia_buf_t* blinded_password,
50
+ pythia_buf_t* blinding_secret) {
51
+
52
+ VirgilPythiaContext context;
53
+ return pythia_w_blind(password, blinded_password, blinding_secret);
54
+ }
55
+
56
+ int virgil_pythia_deblind(
57
+ const pythia_buf_t* transformed_password, const pythia_buf_t* blinding_secret,
58
+ pythia_buf_t* deblinded_password) {
59
+
60
+ VirgilPythiaContext context;
61
+ return pythia_w_deblind(transformed_password, blinding_secret, deblinded_password);
62
+ }
63
+
64
+ int virgil_pythia_compute_transformation_key_pair(const pythia_buf_t* transformation_key_id,
65
+ const pythia_buf_t* pythia_secret,
66
+ const pythia_buf_t* pythia_scope_secret,
67
+ pythia_buf_t* transformation_private_key,
68
+ pythia_buf_t* transformation_public_key) {
69
+
70
+ VirgilPythiaContext context;
71
+ return pythia_w_compute_transformation_key_pair(
72
+ transformation_key_id, pythia_secret, pythia_scope_secret,
73
+ transformation_private_key, transformation_public_key);
74
+ }
75
+
76
+ int virgil_pythia_transform(
77
+ const pythia_buf_t* blinded_password, const pythia_buf_t* tweak,
78
+ const pythia_buf_t* transformation_private_key,
79
+ pythia_buf_t* transformed_password, pythia_buf_t* transformed_tweak) {
80
+
81
+ VirgilPythiaContext context;
82
+ return pythia_w_transform(
83
+ blinded_password, tweak, transformation_private_key,
84
+ transformed_password, transformed_tweak);
85
+ }
86
+
87
+ int virgil_pythia_prove(
88
+ const pythia_buf_t* transformed_password, const pythia_buf_t* blinded_password,
89
+ const pythia_buf_t* transformed_tweak, const pythia_buf_t* transformation_private_key,
90
+ const pythia_buf_t* transformation_public_key, pythia_buf_t* proof_value_c, pythia_buf_t* proof_value_u) {
91
+
92
+ VirgilPythiaContext context;
93
+ return pythia_w_prove(
94
+ transformed_password, blinded_password, transformed_tweak, transformation_private_key,
95
+ transformation_public_key, proof_value_c, proof_value_u);
96
+ }
97
+
98
+ int virgil_pythia_verify(
99
+ const pythia_buf_t* transformed_password, const pythia_buf_t* blinded_password,
100
+ const pythia_buf_t* tweak, const pythia_buf_t* transformation_public_key,
101
+ const pythia_buf_t* proof_value_c, const pythia_buf_t* proof_value_u, int* verified) {
102
+
103
+ VirgilPythiaContext context;
104
+ return pythia_w_verify(
105
+ transformed_password, blinded_password, tweak, transformation_public_key, proof_value_c,
106
+ proof_value_u, verified);
107
+ }
108
+
109
+ int virgil_pythia_get_password_update_token(
110
+ const pythia_buf_t* previous_transformation_private_key,
111
+ const pythia_buf_t* new_transformation_private_key,
112
+ pythia_buf_t* password_update_token) {
113
+
114
+ VirgilPythiaContext context;
115
+ return pythia_w_get_password_update_token(
116
+ previous_transformation_private_key, new_transformation_private_key,
117
+ password_update_token);
118
+ }
119
+
120
+ int virgil_pythia_update_deblinded_with_token(
121
+ const pythia_buf_t* deblinded_password, const pythia_buf_t* password_update_token,
122
+ pythia_buf_t* updated_deblinded_password) {
123
+
124
+ VirgilPythiaContext context;
125
+ return pythia_w_update_deblinded_with_token(
126
+ deblinded_password, password_update_token, updated_deblinded_password);
127
+ }
128
+
129
+ #endif /* VIRGIL_CRYPTO_FEATURE_PYTHIA */
@@ -44,11 +44,12 @@
44
44
  #if !defined(_MSC_VER) || _MSC_VER < 1800
45
45
 
46
46
  #include <memory>
47
+ #include <utility>
47
48
 
48
49
  namespace std {
49
50
  template<typename T, typename... Args>
50
- std::unique_ptr<T> make_unique(Args&& ... args) {
51
- return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
51
+ unique_ptr<T> make_unique(Args&& ... args) {
52
+ return unique_ptr<T>(new T(forward<Args>(args)...));
52
53
  }
53
54
  }
54
55
 
@@ -34,31 +34,27 @@
34
34
  # Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com>
35
35
  #
36
36
 
37
- include (CMakeParseArguments)
38
-
39
- function (APPEND_CMAKE_ARG cmake_var)
40
- set (options)
41
- set (oneValueArgs "NAME;VALUE;TYPE")
42
- set (multiValueArgs)
43
- cmake_parse_arguments (ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
44
-
45
- if (NOT DEFINED ARG_NAME)
46
- message (FATAL_ERROR "Required parameter NAME is not defined.")
47
- endif ()
48
-
49
- if (NOT DEFINED ARG_VALUE)
50
- set (ARG_VALUE ${${ARG_NAME}})
51
- endif ()
52
-
53
- if (NOT DEFINED ARG_TYPE)
54
- set (ARG_TYPE "STRING")
55
- endif ()
56
-
57
- if (NOT DEFINED ARG_VALUE)
58
- return ()
59
- endif ()
60
-
61
- list (APPEND ${cmake_var} -D${ARG_NAME}:${ARG_TYPE}=${ARG_VALUE})
62
-
63
- set (${cmake_var} ${${cmake_var}} PARENT_SCOPE)
64
- endfunction (APPEND_CMAKE_ARG)
37
+ cmake_minimum_required (VERSION @CMAKE_VERSION@ FATAL_ERROR)
38
+
39
+ project ("@VIRGIL_DEPENDS_PACKAGE_NAME@-depends")
40
+
41
+ include (ExternalProject)
42
+
43
+ # Configure additional CMake parameters
44
+ file (APPEND "@VIRGIL_DEPENDS_ARGS_FILE@"
45
+ "set (RELIC_USE_PTHREAD @VIRGIL_CRYPTO_FEATURE_PYTHIA_MT@ CACHE INTERNAL \"\")\n"
46
+ "set (RELIC_USE_EXT_RNG ON CACHE INTERNAL \"\")\n"
47
+ "set (ENABLE_TESTING OFF CACHE INTERNAL \"\")\n"
48
+ "set (CMAKE_INSTALL_LIBDIR lib CACHE INTERNAL \"\")\n"
49
+ )
50
+
51
+ ExternalProject_Add (${PROJECT_NAME}
52
+ DOWNLOAD_DIR "@VIRGIL_DEPENDS_PACKAGE_DOWNLOAD_DIR@"
53
+ GIT_REPOSITORY https://github.com/VirgilSecurity/pythia.git
54
+ GIT_TAG 2a10901d76658a606c70b2c5359dd31b16953b93
55
+ PREFIX "@VIRGIL_DEPENDS_PACKAGE_BUILD_DIR@"
56
+ CMAKE_ARGS "@VIRGIL_DEPENDS_CMAKE_ARGS@"
57
+ )
58
+
59
+ add_custom_target ("${PROJECT_NAME}-build" ALL COMMENT "Build package ${PROJECT_NAME}")
60
+ add_dependencies ("${PROJECT_NAME}-build" ${PROJECT_NAME})
File without changes
File without changes
File without changes
@@ -0,0 +1,293 @@
1
+ /**
2
+ * Copyright (C) 2015-2016 Virgil Security Inc.
3
+ *
4
+ * Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com>
5
+ *
6
+ * All rights reserved.
7
+ *
8
+ * Redistribution and use in source and binary forms, with or without
9
+ * modification, are permitted provided that the following conditions are
10
+ * met:
11
+ *
12
+ * (1) Redistributions of source code must retain the above copyright
13
+ * notice, this list of conditions and the following disclaimer.
14
+ *
15
+ * (2) Redistributions in binary form must reproduce the above copyright
16
+ * notice, this list of conditions and the following disclaimer in
17
+ * the documentation and/or other materials provided with the
18
+ * distribution.
19
+ *
20
+ * (3) Neither the name of the copyright holder nor the names of its
21
+ * contributors may be used to endorse or promote products derived from
22
+ * this software without specific prior written permission.
23
+ *
24
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR
25
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
28
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
32
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
33
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34
+ * POSSIBILITY OF SUCH DAMAGE.
35
+ */
36
+
37
+ /**
38
+ * @file rsa_keys.h
39
+ * @brief Hardcoded constants of deterministic keys.
40
+ *
41
+ * Deterministic keys can be generated via 'VirgilAsymmentricCipher::genKeyPairFromKeyMaterial()' method and
42
+ * 'VirgilKeyPair::genKeyPairFromKeyMaterial()' method.
43
+ *
44
+ * @note Key Material that was used to generated this keys is 512 byte array of 0xAB.
45
+ */
46
+
47
+ #ifndef VIRGIL_CRYPTO_TEST_DETERMINISTIC_KEYS_H
48
+ #define VIRGIL_CRYPTO_TEST_DETERMINISTIC_KEYS_H
49
+
50
+
51
+ constexpr char kDeterministic_KeyMaterial[] =
52
+ "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB"
53
+ "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB"
54
+ "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB"
55
+ "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB"
56
+ "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB"
57
+ "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB"
58
+ "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB"
59
+ "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB"
60
+ "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB"
61
+ "ABABABABABABABABABABABABABABABABAB";
62
+
63
+ constexpr char kDeterministic_RSA_256_Public[] =
64
+ "-----BEGIN PUBLIC KEY-----\n"
65
+ "MDwwDQYJKoZIhvcNAQEBBQADKwAwKAIhAPLAt35Fu5IUBPwiWpg+Tm/dvEeCmC+E\n"
66
+ "O6tYbFB5L/eFAgMBAAE=\n"
67
+ "-----END PUBLIC KEY-----\n";
68
+
69
+ constexpr char kDeterministic_RSA_256_Private[] =
70
+ "-----BEGIN RSA PRIVATE KEY-----\n"
71
+ "MIGqAgEAAiEA8sC3fkW7khQE/CJamD5Ob928R4KYL4Q7q1hsUHkv94UCAwEAAQIg\n"
72
+ "JDBKqo5mug41+Ah/DPcs5gIKh11bkbxbfWQBRkObvHkCEQD5+UWLcmapCpsVWxN2\n"
73
+ "NVoPAhEA+JrheiLtEfm66C3YNou5KwIRAPmxA8WZ3W/m9ygq1FLUUgMCEEppEVQd\n"
74
+ "YBghR3B3SGALMkECEB3Y4ry/oh3PUw+3u/7f7Qs=\n"
75
+ "-----END RSA PRIVATE KEY-----\n";
76
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AFM9thW3iCIMaWO18g\n"
94
+ "GOIuqaP9vpkiA9fsVSOK47Pf2sOxmQo5LCm/6cjKQWun0gHPJTcXoGrfCfkLfDZH\n"
95
+ "EigtNK0mZ2N1C75vBzIqnDZPguTIbuxBYzLpi/qXWjjkNfAvDWRnsahp0RQw7Dhi\n"
96
+ "f16rwh5/zKFhW3ZKqTB4YraGUiVVIgVYLIn4ZwLiv4Js/FaCmG+2brgqdvxfB5zN\n"
97
+ "XfdpBhWTb8S06QBoOhJ2Saw9CvyiT31c34n2vfkrpKlshOvZJQcOVmZX0Fxey2Y3\n"
98
+ "VQvIanh/DpA2dAllWpA4jAMW3wIDTVv16+PzzrgC1nprbSDah5jSD5aReInORy4q\n"
99
+ "L3VBVae3KiYy6AR93nqsAVN6mu0Zs6pDdIbh554hT1yxxtSsn4pKbWIk6UggTICy\n"
100
+ "Z4YZ+w5ZfAtKurLyBC6SjL0wyChSsx/q+BeDFVHOL15jI1/kqB+CrJJTLDJmhshX\n"
101
+ "7b9f1uBWBRBq4hPJuyHlX1voIrdplbn7zfttzb8SgOFUAFKJFPUKPSa9zFjKwxuE\n"
102
+ "3wIDAQAB\n"
103
+ "-----END PUBLIC KEY-----\n";
104
+
105
+ constexpr char kDeterministic_RSA_8192_Private[] =
106
+ "-----BEGIN RSA PRIVATE KEY-----\n"
107
+ "MIISKAIBAAKCBAEA58IFLmkTgewY9qQM/+4gMNAg+hchp5DtifltVXImahSr3H3g\n"
108
+ "od7mMO9BENV+eoGdgGqPcMf7OwFGJHtBuy5MrEQ4dLO7o+HTFD9XuTltD0tPQghs\n"
109
+ "H2ruRB6Nq20Gg8LSAPkq1imS/2qCXBs/8JYtgQazh+KJzdZgMhKReM2V6QRCsMlU\n"
110
+ "8geFgWk+igafCu+aufKuc9zFpzYJgeZr+vpuTJIR6EkjBbOOwwpg76Gsk1j0BB2u\n"
111
+ "N/z9e/mNcdZszQKf0PRj2AHT+zH+k7igaVCcUwHHxmYSdtaUD2ZfpouczDsNvrl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sEf\n"
200
+ "yPxypQq69G56CtNJTex1QQtk2cSSxCXl5zGeMRokPUXFusYGGLh5C/IO/lKf5x1s\n"
201
+ "bh7bA3e+5kcyevzelwD4MXWmUFqfjJ5YmLiDDCS0qUzDtLkVi2A2+Jo9gleL8ADb\n"
202
+ "8jfnwJBI7F7gu5JSc/AYjUsr1cHg6683I6q/zb6GaX8fM6wlZEy1/K9yvEOajaUM\n"
203
+ "JsKJdlAK9DEjJSaVTDFHlK1sLY+SfNDU0Y5SAuZnnmmtJGP5atTRnyktv/U=\n"
204
+ "-----END RSA PRIVATE KEY-----\n";
205
+
206
+
207
+ constexpr char kDeterministic_EC_SECP192R1_Public[] =
208
+ "-----BEGIN PUBLIC KEY-----\n"
209
+ "MEkwEwYHKoZIzj0CAQYIKoZIzj0DAQEDMgAEKJVTlIvk+QQNlr/Af9uCQG3/VJdF\n"
210
+ "io8yY5+jyOqtQY9ND1kc5rw7uXWfVXX9A/85\n"
211
+ "-----END PUBLIC KEY-----\n";
212
+
213
+ constexpr char kDeterministic_EC_SECP192R1_Private[] =
214
+ "-----BEGIN EC PRIVATE KEY-----\n"
215
+ "MF8CAQEEGHn5RYtyZqkKmxVbE3Y1WftrdI0w44w9gKAKBggqhkjOPQMBAaE0AzIA\n"
216
+ "BCiVU5SL5PkEDZa/wH/bgkBt/1SXRYqPMmOfo8jqrUGPTQ9ZHOa8O7l1n1V1/QP/\n"
217
+ "OQ==\n"
218
+ "-----END EC PRIVATE KEY-----\n";
219
+
220
+
221
+ constexpr char kDeterministic_EC_SECP521R1_Public[] =
222
+ "-----BEGIN PUBLIC KEY-----\n"
223
+ "MIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQA83FedxqHmVpjcsTm63/Lyb/tOU35\n"
224
+ "GTDJxFYrz9Gy5xQtoHH815VHLBPb/d+NXNOlhxHOLcldLA/Dq1rI7+jeYzcAb0yu\n"
225
+ "yL39PAmjAPVLdr8R2VVsPxd+agQW0SJDzygWyEWxHK2rZPoOUamYTEVH2kVfBcdK\n"
226
+ "p7lK0IuGLnjxyF8gCp8=\n"
227
+ "-----END PUBLIC KEY-----\n";
228
+
229
+ constexpr char kDeterministic_EC_SECP521R1_Private[] =
230
+ "-----BEGIN EC PRIVATE KEY-----\n"
231
+ "MIHcAgEBBEIA8/KLFuTNUhU2KrYm7Gqz9tbpGmHHGHsAXtSVAlCk6hcHygyoUvjO\n"
232
+ "yPl2e+r5foYvCUI/SZkhl6nwV0tXyIasIY+gBwYFK4EEACOhgYkDgYYABADzcV53\n"
233
+ "GoeZWmNyxObrf8vJv+05TfkZMMnEVivP0bLnFC2gcfzXlUcsE9v9341c06WHEc4t\n"
234
+ "yV0sD8OrWsjv6N5jNwBvTK7Ivf08CaMA9Ut2vxHZVWw/F35qBBbRIkPPKBbIRbEc\n"
235
+ "ratk+g5RqZhMRUfaRV8Fx0qnuUrQi4YuePHIXyAKnw==\n"
236
+ "-----END EC PRIVATE KEY-----\n";
237
+
238
+
239
+ constexpr char kDeterministic_EC_BP512R1_Public[] =
240
+ "-----BEGIN PUBLIC KEY-----\n"
241
+ "MIGbMBQGByqGSM49AgEGCSskAwMCCAEBDQOBggAEYcWHH2onaD/P8wdWagF9C8tc\n"
242
+ "RgqGPGWb4mjK6vRh98ImV+mRAoO0Lfs23hF36xgJhyg01jf1fNVpjVIITsLjhEtH\n"
243
+ "ucgPQm3I/SKNb0qrRL6zSGcctH028EsNgZyYmm8T+7JCK3zS21POvmmwVBvMxkYD\n"
244
+ "jrtpeVmtvnpZZ4oMwK0=\n"
245
+ "-----END PUBLIC KEY-----\n";
246
+
247
+ constexpr char kDeterministic_EC_BP512R1_Private[] =
248
+ "-----BEGIN EC PRIVATE KEY-----\n"
249
+ "MIHaAgEBBEB5+UWLcmapCpsVWxN2NVn7a3SNMOOMPYAvakqBKFJ1C4PlBlQpfGdk\n"
250
+ "fLs99Xy/QxeEoR+kzJDL1PgrpavkQ1YQoAsGCSskAwMCCAEBDaGBhQOBggAEYcWH\n"
251
+ "H2onaD/P8wdWagF9C8tcRgqGPGWb4mjK6vRh98ImV+mRAoO0Lfs23hF36xgJhyg0\n"
252
+ "1jf1fNVpjVIITsLjhEtHucgPQm3I/SKNb0qrRL6zSGcctH028EsNgZyYmm8T+7JC\n"
253
+ "K3zS21POvmmwVBvMxkYDjrtpeVmtvnpZZ4oMwK0=\n"
254
+ "-----END EC PRIVATE KEY-----\n";
255
+
256
+
257
+ constexpr char kDeterministic_EC_SECP256K1_Public[] =
258
+ "-----BEGIN PUBLIC KEY-----\n"
259
+ "MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAE+9D+eNiEeNEr54F8w4pDadPviB9g6XQ1\n"
260
+ "tfUFsfGTjzEBMVvQdY9iiG3hFkvHW5b5AqWKC4O1C8c0C5G7mXrSEA==\n"
261
+ "-----END PUBLIC KEY-----\n";
262
+
263
+ constexpr char kDeterministic_EC_SECP256K1_Private[] =
264
+ "-----BEGIN EC PRIVATE KEY-----\n"
265
+ "MHQCAQEEIHn5RYtyZqkKmxVbE3Y1WftrdI0w44w9gC9qSoEoUnULoAcGBSuBBAAK\n"
266
+ "oUQDQgAE+9D+eNiEeNEr54F8w4pDadPviB9g6XQ1tfUFsfGTjzEBMVvQdY9iiG3h\n"
267
+ "FkvHW5b5AqWKC4O1C8c0C5G7mXrSEA==\n"
268
+ "-----END EC PRIVATE KEY-----\n";
269
+
270
+
271
+ constexpr char kDeterministic_FAST_EC_X25519_Public[] =
272
+ "-----BEGIN PUBLIC KEY-----\n"
273
+ "MCowBQYDK2VuAyEA1l8vn0g1OjUbDfqnon6PxMiRVtX+/95JmyxEzJnO4Vw=\n"
274
+ "-----END PUBLIC KEY-----\n";
275
+
276
+ constexpr char kDeterministic_FAST_EC_X25519_Private[] =
277
+ "-----BEGIN PRIVATE KEY-----\n"
278
+ "MC4CAQAwBQYDK2VuBCIEIHn5RYtyZqkKmxVbE3Y1WftrdI0w44w9gC9qSoEoUnUL\n"
279
+ "-----END PRIVATE KEY-----\n";
280
+
281
+
282
+ constexpr char kDeterministic_FAST_EC_ED25519_Public[] =
283
+ "-----BEGIN PUBLIC KEY-----\n"
284
+ "MCowBQYDK2VwAyEA1eQkkQRZQagM4xOddC68mndhtJu4+IunGaYXc+C+gjg=\n"
285
+ "-----END PUBLIC KEY-----\n";
286
+
287
+ constexpr char kDeterministic_FAST_EC_ED25519_Private[] =
288
+ "-----BEGIN PRIVATE KEY-----\n"
289
+ "MC4CAQAwBQYDK2VwBCIEIHn5RYtyZqkKmxVbE3Y1WftrdI0w44w9gC9qSoEoUnUL\n"
290
+ "-----END PRIVATE KEY-----\n";
291
+
292
+
293
+ #endif /* VIRGIL_CRYPTO_TEST_DETERMINISTIC_KEYS_H */