Skip to main content
@tevm/voltaire
@tevm/voltaire / index / wasm / P256Wasm

P256Wasm

Classes

InvalidPrivateKeyError

Defined in: src/crypto/p256.wasm.ts:64

Extends

Constructors

Constructor
new InvalidPrivateKeyError(message): InvalidPrivateKeyError
Defined in: src/crypto/p256.wasm.ts:65
Parameters
message
string
Returns
InvalidPrivateKeyError
Overrides
P256Error.constructor

InvalidPublicKeyError

Defined in: src/crypto/p256.wasm.ts:57

Extends

Constructors

Constructor
new InvalidPublicKeyError(message): InvalidPublicKeyError
Defined in: src/crypto/p256.wasm.ts:58
Parameters
message
string
Returns
InvalidPublicKeyError
Overrides
P256Error.constructor

InvalidSignatureError

Defined in: src/crypto/p256.wasm.ts:50

Extends

Constructors

Constructor
new InvalidSignatureError(message): InvalidSignatureError
Defined in: src/crypto/p256.wasm.ts:51
Parameters
message
string
Returns
InvalidSignatureError
Overrides
P256Error.constructor

P256Error

Defined in: src/crypto/p256.wasm.ts:43

Extends

  • Error

Extended by

Constructors

Constructor
new P256Error(message): P256Error
Defined in: src/crypto/p256.wasm.ts:44
Parameters
message
string
Returns
P256Error
Overrides
Error.constructor

Type Aliases

PrivateKey

PrivateKey = Uint8Array
Defined in: src/crypto/p256.wasm.ts:26

PublicKey

PublicKey = Uint8Array
Defined in: src/crypto/p256.wasm.ts:25

Signature

Signature = object
Defined in: src/crypto/p256.wasm.ts:20

Properties

r
r: Uint8Array
Defined in: src/crypto/p256.wasm.ts:21
s
s: Uint8Array
Defined in: src/crypto/p256.wasm.ts:22

Variables

CURVE_ORDER

const CURVE_ORDER: 115792089210356248762697446949407573529996955224135760342422259061068512044369n = 0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551n
Defined in: src/crypto/p256.wasm.ts:32

PRIVATE_KEY_SIZE

const PRIVATE_KEY_SIZE: 32 = 32
Defined in: src/crypto/p256.wasm.ts:34

PUBLIC_KEY_SIZE

const PUBLIC_KEY_SIZE: 64 = 64
Defined in: src/crypto/p256.wasm.ts:35

SHARED_SECRET_SIZE

const SHARED_SECRET_SIZE: 32 = 32
Defined in: src/crypto/p256.wasm.ts:37

SIGNATURE_COMPONENT_SIZE

const SIGNATURE_COMPONENT_SIZE: 32 = 32
Defined in: src/crypto/p256.wasm.ts:36

Functions

derivePublicKey()

derivePublicKey(privateKey): PublicKey
Defined in: src/crypto/p256.wasm.ts:152

Parameters

privateKey
PrivateKey

Returns

PublicKey

ecdh()

ecdh(privateKey, publicKey): Uint8Array
Defined in: src/crypto/p256.wasm.ts:175

Parameters

privateKey
PrivateKey
publicKey
PublicKey

Returns

Uint8Array

sign()

sign(messageHash, privateKey): Signature
Defined in: src/crypto/p256.wasm.ts:75

Parameters

messageHash
HashType
privateKey
PrivateKey

Returns

Signature

validatePrivateKey()

validatePrivateKey(privateKey): boolean
Defined in: src/crypto/p256.wasm.ts:202

Parameters

privateKey
PrivateKey

Returns

boolean

validatePublicKey()

validatePublicKey(publicKey): boolean
Defined in: src/crypto/p256.wasm.ts:216

Parameters

publicKey
PublicKey

Returns

boolean

verify()

verify(signature, messageHash, publicKey): boolean
Defined in: src/crypto/p256.wasm.ts:100

Parameters

signature
Signature
messageHash
HashType
publicKey
PublicKey

Returns

boolean