• Convert the Crypto values from JWK to the equivalent Multikey Pairs' binary data. The final encoding, with preambles, are done in the general level.

    For ECDSA, the compressed form must be calculated, by adding an extra byte signaling which of the two possible 'y' values are used.

    (The y value is set as optional in the signature but that is only to make TypeScript happy. A missing value generates an error)

    Parameters

    • curve: CryptoCurves

      choice between P-256 and P-384

    • x: Uint8Array

      x value for the elliptical curve

    • d: Uint8Array

      d (private) value for the elliptical curve

    • Optionaly: Uint8Array

      y value for the elliptical curve

    Returns MultikeyBinary