Closed TheYangCode closed 2 months ago
Value m_size
should be the length of m
, not its size.
bn_t output
uint8_t output_hash[RLC_MD_LEN_SH256];
md_map_sh256(output_hash, input, input_len);
bn_read_bin(output, output_hash, RLC_MD_LEN_SH256);
bn_mod_basic(output, output, q);
Hello, I have modified my code, but I am encountering this error here. ERROR in dv_zero() at /home/yang/relic-main/src/dv/relic_dv_util.c,57: insufficient precision.
You should initialize output
with bn_new()
and finalize it too. Have you initialized q
as well with some group order?
Thank you for your answer. My question has been resolved
Another question, does the current Relic library support Merkle tree generation calculation?
Nope, not implemented!
Hello, I used the following code:
Hash result:07116C344512DC38D960BBFAF305B0D1020484C77DD3EFE6E06C38066A92D495C0099A54FE7F But the true sha256 hash result is :936a185caaa266bb9cbe981e9e05cb78cd732b0b3280eb944412bb6f8f8f07af
I want to know why?Thank you.