Closed mratsim closed 4 years ago
Hmm. I just checked that the code does the right thing, so I am guessing the disconnect is in the way things are getting translated into the test vectors (which is good---much worse if the code is broken!).
I may not have time to look into this until tomorrow afternoon or Thursday, but I'll get back to you asap.
Thanks for the report!
Ah, well, here's an obvious issue: the SHA-256 and SHA-512 test vectors are identical. I'm guessing this means what we're listing as SHA-256 test vectors are not.
Aha! found it. I'll open a PR now.
I may be missing something obvious but from the https://github.com/cfrg/draft-irtf-cfrg-hash-to-curve/pull/259 vectors (great idea) I have an issue with msg_prime padding:
Vector:
Spec:
msg_prime
this partl_i_b_str || I2OSP(0, 1) || DST_prime
002000515555582d5630312d435330322d776974682d657870616e6465721b
0020...
we have 4*54+40 zeros for a total of 256.