cfrg / draft-irtf-cfrg-voprf

Oblivious Pseudorandom Functions (OPRFs) using Prime-Order Groups
https://cfrg.github.io/draft-irtf-cfrg-voprf/#go.draft-irtf-cfrg-voprf.html
Other
39 stars 15 forks source link

Mismatched labels between test vectors and spec #269

Closed FredericJacobs closed 3 years ago

FredericJacobs commented 3 years ago

Spec says the following for evaluate.

def Evaluate(skS, blindedElement, info):
  R = GG.DeserializeElement(blindedElement)
  context = "Context-" || contextString ||
            I2OSP(len(info), 2) || info

But test vectors use an undefined Metadata tag that does not exist in the spec.

   def evaluate(self, blinded_element, info):
        R = self.suite.group.deserialize(blinded_element)
        metadataDST = _as_bytes("Metadata-") + self.context_string
        metadata_input = I2OSP(len(info), 2) + info \
            + I2OSP(len(metadataDST), 2) + metadataDST
        t = self.suite.group.hash_to_scalar(metadata_input, self.scalar_domain_separation_tag())
chris-wood commented 3 years ago

Fixed in #268.