openwallet-foundation/credo-ts

EC Public key expansion does not prefix with `4`

Opened this issue · 0 comments

Looking here:

export function expand(publicKey: Uint8Array, curve: 'P-256' | 'P-384' | 'P-521' | 'secp256k1'): Uint8Array {

This code does not seem to add the required 4 as a prefix for an EC expanded public key.

"The older uncompressed keys are 65 bytes, consisting of constant prefix (0x04), followed by two 256-bit integers called x and y (2 * 32 bytes)."