Namespace: P256

Hacl~P256

Methods

(static) compressed_to_raw(b) → {bool|buffer}

Parameters:
Name Type Description
b buffer size 33
Source:
Returns:
  • Type
    bool
  • result - size 64
    Type
    buffer

(static) dh_initiator(scalar) → {bool|buffer}

Parameters:
Name Type Description
scalar buffer size 32
Source:
Returns:
  • Type
    bool
  • result - size 64
    Type
    buffer

(static) dh_responder(pubKey, scalar) → {bool|buffer}

Parameters:
Name Type Description
pubKey buffer size 64
scalar buffer size 32
Source:
Returns:
  • Type
    bool
  • result - size 64
    Type
    buffer

(static) ecdsa_sign_sha2(m, privkey, k) → {bool|buffer}

Parameters:
Name Type Description
m buffer size mlen
privkey buffer size 32
k buffer size 32
Source:
Returns:
  • Type
    bool
  • result - size 64
    Type
    buffer

(static) ecdsa_sign_without_hash(m, privkey, k) → {bool|buffer}

Parameters:
Name Type Description
m buffer size mlen
privkey buffer size 32
k buffer size 32
Source:
Returns:
  • Type
    bool
  • result - size 64
    Type
    buffer

(static) ecdsa_verif_sha2(m, pubkey, r, s) → {bool}

Parameters:
Name Type Description
m buffer size mlen
pubkey buffer size 64
r buffer size 32
s buffer size 32
Source:
Returns:
Type
bool

(static) ecdsa_verif_without_hash(m, pubkey, r, s) → {bool}

Parameters:
Name Type Description
m buffer size mlen
pubkey buffer size 64
r buffer size 32
s buffer size 32
Source:
Returns:
Type
bool

(static) raw_to_compressed(b) → {buffer}

Parameters:
Name Type Description
b buffer size 64
Source:
Returns:
result - size 33
Type
buffer

(static) raw_to_uncompressed(b) → {buffer}

Parameters:
Name Type Description
b buffer size 64
Source:
Returns:
result - size 65
Type
buffer

(static) uncompressed_to_raw(b) → {bool|buffer}

Parameters:
Name Type Description
b buffer size 65
Source:
Returns:
  • Type
    bool
  • result - size 64
    Type
    buffer

(static) validate_private_key(pubKey) → {bool}

Parameters:
Name Type Description
pubKey buffer size 32
Source:
Returns:
Type
bool

(static) validate_public_key(pubKey) → {bool}

Parameters:
Name Type Description
pubKey buffer size 64
Source:
Returns:
Type
bool