ECIES: Replace SHA1 with RIPEMD-160.
authorCryptoManiac <balthazar@yandex.ru>
Sun, 13 Mar 2016 15:54:36 +0000 (18:54 +0300)
committerCryptoManiac <balthazar@yandex.ru>
Sun, 13 Mar 2016 15:54:36 +0000 (18:54 +0300)
src/ecies.cpp

index 3f8eaf7..dec773f 100644 (file)
@@ -559,8 +559,8 @@ ies_ctx_t *create_context(EC_KEY *user_key)
     try {
       ies_ctx_t* ctx = new ies_ctx_t;
       ctx->cipher = EVP_aes_128_cbc();
-      ctx->md = EVP_sha1();
-      ctx->kdf_md = EVP_sha1();
+      ctx->md = EVP_ripemd160();
+      ctx->kdf_md = EVP_ripemd160();
       ctx->stored_key_length = 33;
       ctx->user_key = user_key;
       return ctx;
@@ -570,4 +570,4 @@ ies_ctx_t *create_context(EC_KEY *user_key)
 // TODO: add checking to NULL where necessary
       return NULL;
     }
-}
\ No newline at end of file
+}