code: function loadCompressedPublicKey(xBuffer) {
  	let x = new BN(xBuffer);
  
  	// overflow
  	if (x.cmp(ecparams.p) >= 0) return null;
  	x = x.toRed(ecparams.red);
  
  	// compute corresponding Y
  	let y = x.redSqr().redIMul(x).redIAdd(ecparams.b).redSqrt();
  
  	return ec.keyPair({ pub: { x, y } });
  }
docs: function loadPublicKey(publicKey) { const first = publicKey[0]; switch (first) { case 0x02: case 0x03: if (publicKey.length !== 33) return null; return loadCompressedPublicKey(first, publicKey.slice(1, 33)); case 0x04: case 0x06: case 0x07: if (publicKey.length !== 65) return null; return loadUncompressedPublicKey(first, publicKey.slice(1, 33), publicKey.slice(33, 65)); default: return null; } }