Browse Source

changing the RHO from SHA3 to SHA2 due to OpenSSL version differences on RIPPLE

tristangurtler 3 years ago
parent
commit
adb5f69639
2 changed files with 4 additions and 3 deletions
  1. 1 0
      .gitignore
  2. 3 3
      prsona/src/proof.cpp

+ 1 - 0
.gitignore

@@ -1,3 +1,4 @@
 **/bin/
 **/obj/
 **/tmp/
+**/out/

+ 3 - 3
prsona/src/proof.cpp

@@ -18,15 +18,15 @@ Scalar bytes_to_scalar(
     return Scalar(value);
 }
 
-// Random Oracle (i.e. SHA3_256)
+// Random Oracle (i.e. SHA256)
 Scalar oracle(
     const std::string& input)
 {
     uint32_t digest_length = SHA256_DIGEST_LENGTH;
-    const EVP_MD* algorithm = EVP_sha3_256();
+    const EVP_MD* algorithm = EVP_sha256();
     uint8_t* digest = static_cast<uint8_t*>(OPENSSL_malloc(digest_length));
     
-    EVP_MD_CTX* context = EVP_MD_CTX_new();
+    EVP_MD_CTX* context = EVP_MD_CTX_create();
     EVP_DigestInit_ex(context, algorithm, NULL);
     EVP_DigestUpdate(context, input.c_str(), input.size());
     EVP_DigestFinal_ex(context, digest, &digest_length);