Closed krissully closed 1 year ago
@cjpatton
The format of a OPRF keys are raw scalar and curve point. https://github.com/cloudflare/circl/blob/main/oprf/keys.go#L21
For example, for P256, the private key is a 32-byte number and the public key is a compressed point in 33 bytes.
Assuming your key.pem
was generated as:
$ openssl ecparam -name prime256v1 -genkey -out key.pem
You can recover the internal values with:
$ openssl ec -in key.pem -text -noout
In Go, you can do so similarly as in ParseECPrivateKey, but instead use the UnmarshalBinary method from the OPRF package.
Closing as answered.
Is there a way to use a private key in pem format when configuring an oprf server?