ECCS¶
- class index.ECCS()¶
The
ECCSclass manages and provides access to supported Elliptic Curve Cryptography (ECC) implementations.It maintains a dictionary of available ECC algorithm classes, such as Ed25519, Ed25519-Blake2b, Ed25519-Monero, Nist256p1, and Secp256k1. This class allows retrieval, validation, and enumeration of these ECC types.
exported from
eccs.indexName
Class
KholawEd25519ECC
SLIP10Ed25519ECC
SLIP10Ed25519Blake2bECC
SLIP10Ed25519MoneroECC
SLIP10Nist256p1ECC
SLIP10Secp256k1ECC
- static index.ECCS.getClasses()¶
Get all available ECC classes.
- Returns:
typeof EllipticCurveCryptography[] – Array of ECC classes.
- static index.ECCS.getECCClass(name)¶
Retrieve an ECC class by its name.
- Arguments:
name (string) – The ECC class name.
- Returns:
any – The corresponding ECC class.
- static index.ECCS.getNames()¶
Get the names of all supported ECC implementations.
- Returns:
string[] – List of ECC class names.
- static index.ECCS.isECC(name)¶
Check if a given name corresponds to a valid ECC implementation.
- Arguments:
name (string) – The ECC name to verify.
- Returns:
boolean – True if valid, false otherwise.
- class point.Point(point)¶
Abstract base class representing a point on an elliptic curve.
Provides a common interface for point-related operations across different elliptic curve implementations. Must be extended by concrete curve-specific point classes.
abstract
exported from
eccs.pointConstructs a new Point instance.
- Arguments:
point (any) – The underlying point representation (curve-specific object).
- point.Point.point¶
type: any
- point.Point.add(point)¶
Adds another point to this point.
- Arguments:
point (Point) – The point to add.
- Returns:
Point – A new Point instance representing the sum.
- point.Point.getName()¶
Returns the name of the curve or point type.
- Returns:
string – The name of the point (e.g., “secp256k1”, “ed25519”).
- point.Point.getRaw()¶
Returns the raw byte representation of the point.
- Returns:
Uint8Array – The encoded point as a Uint8Array.
- point.Point.getRawDecoded()¶
Returns the decoded form of the point.
- Returns:
Uint8Array – The decoded bytes of the point.
- point.Point.getRawEncoded()¶
Returns the encoded form of the point.
- Returns:
Uint8Array – The encoded bytes of the point.
- point.Point.getUnderlyingObject()¶
Returns the underlying ECC-specific point object.
- Returns:
any – The underlying curve-specific object.
- point.Point.getX()¶
Returns the X coordinate of the point.
- Returns:
bigint – The X coordinate as a bigint.
- point.Point.getY()¶
Returns the Y coordinate of the point.
- Returns:
bigint – The Y coordinate as a bigint.
- point.Point.multiply(scalar)¶
Multiplies the point by a scalar.
- Arguments:
scalar (bigint) – The scalar multiplier.
- Returns:
Point – A new Point instance representing the result of scalar multiplication.
- static point.Point.fromBytes(point)¶
Creates a Point instance from its byte representation.
- Arguments:
point (Uint8Array) – The encoded point as a Uint8Array.
- Returns:
Point – A Point instance for the given bytes.
- static point.Point.fromCoordinates(x, y)¶
Creates a Point instance from X and Y coordinates.
- Arguments:
x (bigint) – The X coordinate of the point.
y (bigint) – The Y coordinate of the point.
- Returns:
Point – A Point instance representing the given coordinates.
- class private-key.PrivateKey(privateKey, options={})¶
Abstract base class representing a private key in elliptic curve cryptography (ECC).
This class defines the common interface and behavior expected for all private key implementations. Concrete subclasses (e.g., for specific curves) must override all abstract and static methods as needed.
abstract
exported from
eccs.private-keyConstructs a new PrivateKey instance.
- Arguments:
privateKey (any) – The underlying curve-specific private key object.
options (OptionsPrivateKey) – Optional configuration for the private key.
- private-key.PrivateKey.options¶
type: OptionsPrivateKey
- private-key.PrivateKey.privateKey¶
type: any
- private-key.PrivateKey.getName()¶
Returns the name of the cryptographic curve or private key type.
- Returns:
string – The name of the private key (e.g., “secp256k1”, “ed25519”).
- private-key.PrivateKey.getPublicKey()¶
Derives and returns the corresponding public key.
- Returns:
PublicKey – The public key derived from this private key.
- private-key.PrivateKey.getRaw()¶
Returns the raw byte representation of the private key.
- Returns:
Uint8Array – The private key bytes as a Uint8Array.
- private-key.PrivateKey.getUnderlyingObject()¶
Returns the underlying curve-specific private key object.
- Returns:
any – The underlying private key instance from the ECC library.
- static private-key.PrivateKey.fromBytes(privateKey)¶
Creates a PrivateKey instance from its byte representation.
- Arguments:
privateKey (Uint8Array) – The private key as a byte array.
- Returns:
PrivateKey – A new PrivateKey instance.
- static private-key.PrivateKey.getLength()¶
Returns the length (in bytes) of the private key.
- Returns:
number – The private key size in bytes.
- static private-key.PrivateKey.isValidBytes(bytes)¶
Validates whether a given byte sequence represents a valid private key.
- Arguments:
bytes (Uint8Array) – The private key bytes to validate.
- Returns:
boolean – true if the bytes represent a valid private key, otherwise
false.
- class public-key.PublicKey(publicKey)¶
Abstract base class representing a public key in elliptic curve cryptography (ECC).
This class defines the common structure and interface for public key implementations. Subclasses for specific curves must implement all abstract and static methods.
abstract
exported from
eccs.public-keyConstructs a new PublicKey instance.
- Arguments:
publicKey (any) – The underlying curve-specific public key object.
- public-key.PublicKey.publicKey¶
type: any
- public-key.PublicKey.getName()¶
Returns the name of the cryptographic curve or public key type.
- Returns:
string – The name of the public key (e.g., “secp256k1”, “ed25519”).
- public-key.PublicKey.getPoint()¶
Returns the elliptic curve point associated with this public key.
- Returns:
Point – The corresponding elliptic curve Point instance.
- public-key.PublicKey.getRawCompressed()¶
Returns the compressed byte representation of the public key.
- Returns:
Uint8Array – The compressed public key bytes as a Uint8Array.
- public-key.PublicKey.getRawUncompressed()¶
Returns the uncompressed byte representation of the public key.
- Returns:
Uint8Array – The uncompressed public key bytes as a Uint8Array.
- public-key.PublicKey.getUnderlyingObject()¶
Returns the underlying curve-specific public key object.
- Returns:
any – The internal ECC public key instance.
- static public-key.PublicKey.fromBytes(publicKey)¶
Creates a PublicKey instance from its byte representation.
- Arguments:
publicKey (Uint8Array) – The public key as a byte array.
- Returns:
PublicKey – A new PublicKey instance.
- static public-key.PublicKey.fromPoint(point)¶
Creates a PublicKey instance from a given Point.
- Arguments:
point (Point) – The elliptic curve point representing the public key.
- Returns:
PublicKey – A new PublicKey instance.
- static public-key.PublicKey.getCompressedLength()¶
Returns the length (in bytes) of a compressed public key.
- Returns:
number – The compressed key size in bytes.
- static public-key.PublicKey.getUncompressedLength()¶
Returns the length (in bytes) of an uncompressed public key.
- Returns:
number – The uncompressed key size in bytes.
- static public-key.PublicKey.isValidBytes(bytes)¶
Validates whether the provided byte array represents a valid public key.
- Arguments:
bytes (Uint8Array) – The public key bytes to validate.
- Returns:
boolean – true if valid, otherwise
false.
- static public-key.PublicKey.isValidPoint(point)¶
Validates whether the given elliptic curve point represents a valid public key.
- Arguments:
point (Point) – The point to validate.
- Returns:
boolean – true if valid, otherwise
false.
- class kholaw.ed25519.index.KholawEd25519ECC()¶
Represents the Kholaw-Ed25519 elliptic curve cryptography implementation. Extends the SLIP10-Ed25519 curve with Kholaw-specific key handling.
exported from
eccs.kholaw.ed25519.index- Extends:
EllipticCurveCryptography
- kholaw.ed25519.index.KholawEd25519ECC.GENERATOR¶
type: Point
- kholaw.ed25519.index.KholawEd25519ECC.NAME¶
type: string
- kholaw.ed25519.index.KholawEd25519ECC.ORDER¶
type: bigint
- kholaw.ed25519.index.KholawEd25519ECC.POINT¶
type: typeof Point
- kholaw.ed25519.index.KholawEd25519ECC.PRIVATE_KEY¶
type: typeof PrivateKey
- kholaw.ed25519.index.KholawEd25519ECC.PUBLIC_KEY¶
type: typeof PublicKey
- class kholaw.ed25519.point.KholawEd25519Point()¶
KholawEd25519Point
exported from
eccs.kholaw.ed25519.point- Extends:
SLIP10Ed25519Point
- kholaw.ed25519.point.KholawEd25519Point.getName()¶
- Returns:
string – The curve name identifier.
- class kholaw.ed25519.private-key.KholawEd25519PrivateKey(privateKey, options)¶
Represents a Kholaw Ed25519 private key with an extended key.
exported from
eccs.kholaw.ed25519.private-key- Extends:
SLIP10Ed25519PrivateKey
Creates a new KholawEd25519PrivateKey instance.
- Arguments:
privateKey (Uint8Array) – The private key bytes.
options (OptionsPrivateKey) – The private key options including the extended key.
- kholaw.ed25519.private-key.KholawEd25519PrivateKey.getName()¶
Returns the curve name identifier.
- Returns:
string – The curve name “Kholaw-Ed25519”.
- kholaw.ed25519.private-key.KholawEd25519PrivateKey.getPublicKey()¶
Derives and returns the corresponding KholawEd25519 public key.
- Returns:
PublicKey – The derived KholawEd25519PublicKey instance.
- kholaw.ed25519.private-key.KholawEd25519PrivateKey.getRaw()¶
Returns the serialized form of the private key including the extended key.
- Returns:
Uint8Array – The raw serialized private key bytes.
- static kholaw.ed25519.private-key.KholawEd25519PrivateKey.fromBytes(privateKey)¶
Creates a private key instance from serialized bytes.
- Arguments:
privateKey (Uint8Array) – The serialized private key bytes.
- Returns:
PrivateKey – A new KholawEd25519PrivateKey instance.
- static kholaw.ed25519.private-key.KholawEd25519PrivateKey.getLength()¶
Returns the total byte length of the private key including the extended key.
- Returns:
number – The byte length of the private key.
- class kholaw.ed25519.public-key.KholawEd25519PublicKey()¶
Represents a Kholaw Ed25519 public key implementation.
exported from
eccs.kholaw.ed25519.public-key- Extends:
SLIP10Ed25519PublicKey
- kholaw.ed25519.public-key.KholawEd25519PublicKey.getName()¶
Returns the name of the public key curve.
- Returns:
string – The curve name “Kholaw-Ed25519”.
- kholaw.ed25519.public-key.KholawEd25519PublicKey.getPoint()¶
Returns the point representation of this public key.
- Returns:
Point – A KholawEd25519Point instance representing the public key.
- class slip10.ed25519.index.SLIP10Ed25519ECC()¶
Implements the SLIP10-Ed25519 elliptic curve cryptography scheme. Provides point, public key, and private key definitions for Ed25519 curve operations.
exported from
eccs.slip10.ed25519.index- Extends:
EllipticCurveCryptography
- slip10.ed25519.index.SLIP10Ed25519ECC.GENERATOR¶
type: Point
- slip10.ed25519.index.SLIP10Ed25519ECC.NAME¶
type: string
- slip10.ed25519.index.SLIP10Ed25519ECC.ORDER¶
type: bigint
- slip10.ed25519.index.SLIP10Ed25519ECC.POINT¶
type: typeof Point
- slip10.ed25519.index.SLIP10Ed25519ECC.PRIVATE_KEY¶
type: typeof PrivateKey
- slip10.ed25519.index.SLIP10Ed25519ECC.PUBLIC_KEY¶
type: typeof PublicKey
- class slip10.ed25519.point.SLIP10Ed25519Point()¶
Represents a point on the SLIP10-Ed25519 elliptic curve. Provides encoding, arithmetic, and coordinate access methods.
exported from
eccs.slip10.ed25519.point- Extends:
Point
- slip10.ed25519.point.SLIP10Ed25519Point.add(point)¶
Add another point to this point.
- Arguments:
point (Point) – The point to add.
- Returns:
Point – The sum of the two points.
- slip10.ed25519.point.SLIP10Ed25519Point.getName()¶
- Returns:
string – The name of the elliptic curve point.
- slip10.ed25519.point.SLIP10Ed25519Point.getRawDecoded()¶
- Returns:
Uint8Array – Raw decoded point bytes (X||Y).
- slip10.ed25519.point.SLIP10Ed25519Point.getRawEncoded()¶
- Returns:
Uint8Array – Raw encoded point bytes.
- slip10.ed25519.point.SLIP10Ed25519Point.getUnderlyingObject()¶
- Returns:
any – The underlying curve point object.
- slip10.ed25519.point.SLIP10Ed25519Point.getX()¶
- Returns:
bigint – The X coordinate of the point.
- slip10.ed25519.point.SLIP10Ed25519Point.getY()¶
- Returns:
bigint – The Y coordinate of the point.
- slip10.ed25519.point.SLIP10Ed25519Point.multiply(scalar)¶
Multiply this point by a scalar.
- Arguments:
scalar (bigint) – The multiplier.
- Returns:
Point – The resulting point.
- static slip10.ed25519.point.SLIP10Ed25519Point.fromBytes(point)¶
Create a point from raw bytes.
- Arguments:
point (Uint8Array) – Encoded point bytes.
- Returns:
Point – The constructed point.
- static slip10.ed25519.point.SLIP10Ed25519Point.fromCoordinates(x, y)¶
Create a point from affine coordinates.
- Arguments:
x (bigint) – X coordinate.
y (bigint) – Y coordinate.
- Returns:
Point – The constructed point.
- class slip10.ed25519.private-key.SLIP10Ed25519PrivateKey()¶
Represents a private key for the SLIP10-Ed25519 elliptic curve. Provides encoding, raw access, and public key derivation.
exported from
eccs.slip10.ed25519.private-key- Extends:
PrivateKey
- slip10.ed25519.private-key.SLIP10Ed25519PrivateKey.getName()¶
- Returns:
string – The name of the elliptic curve.
- slip10.ed25519.private-key.SLIP10Ed25519PrivateKey.getPublicKey()¶
Derive the corresponding public key from this private key.
- Returns:
PublicKey – The derived public key.
- slip10.ed25519.private-key.SLIP10Ed25519PrivateKey.getRaw()¶
- Returns:
Uint8Array – Raw private key bytes.
- slip10.ed25519.private-key.SLIP10Ed25519PrivateKey.getUnderlyingObject()¶
- Returns:
any – The underlying private key object.
- static slip10.ed25519.private-key.SLIP10Ed25519PrivateKey.fromBytes(privateKey)¶
Create a private key from raw bytes.
- Arguments:
privateKey (Uint8Array) – Encoded private key bytes.
- Returns:
PrivateKey – The constructed private key.
- static slip10.ed25519.private-key.SLIP10Ed25519PrivateKey.getLength()¶
- Returns:
number – The expected length of the private key in bytes.
- class slip10.ed25519.public-key.SLIP10Ed25519PublicKey()¶
Represents a public key for the SLIP10-Ed25519 elliptic curve. Provides encoding, compressed/uncompressed bytes, and point access.
exported from
eccs.slip10.ed25519.public-key- Extends:
PublicKey
- slip10.ed25519.public-key.SLIP10Ed25519PublicKey.getName()¶
- Returns:
string – The name of the elliptic curve.
- slip10.ed25519.public-key.SLIP10Ed25519PublicKey.getPoint()¶
- Returns:
Point – The elliptic curve point corresponding to this public key.
- slip10.ed25519.public-key.SLIP10Ed25519PublicKey.getRawCompressed()¶
- Returns:
Uint8Array – The compressed public key bytes.
- slip10.ed25519.public-key.SLIP10Ed25519PublicKey.getRawUncompressed()¶
- Returns:
Uint8Array – The uncompressed public key bytes (same as compressed).
- slip10.ed25519.public-key.SLIP10Ed25519PublicKey.getUnderlyingObject()¶
- Returns:
any – The underlying public key object.
- static slip10.ed25519.public-key.SLIP10Ed25519PublicKey.fromBytes(publicKey)¶
Create a public key from raw bytes.
- Arguments:
publicKey (Uint8Array) – Encoded public key bytes.
- Returns:
PublicKey – The constructed public key.
- static slip10.ed25519.public-key.SLIP10Ed25519PublicKey.fromPoint(point)¶
Create a public key from a point.
- Arguments:
point (Point) – The elliptic curve point.
- Returns:
PublicKey – The constructed public key.
- static slip10.ed25519.public-key.SLIP10Ed25519PublicKey.getCompressedLength()¶
- Returns:
number – The length of the compressed public key in bytes.
- static slip10.ed25519.public-key.SLIP10Ed25519PublicKey.getUncompressedLength()¶
- Returns:
number – The length of the uncompressed public key in bytes.
- class slip10.ed25519.blake2b.index.SLIP10Ed25519Blake2bECC()¶
Represents the SLIP10-Ed25519-Blake2b elliptic curve cryptography class. Provides access to generator, order, points, public and private key classes.
exported from
eccs.slip10.ed25519.blake2b.index- Extends:
EllipticCurveCryptography
- slip10.ed25519.blake2b.index.SLIP10Ed25519Blake2bECC.GENERATOR¶
type: Point
- slip10.ed25519.blake2b.index.SLIP10Ed25519Blake2bECC.NAME¶
type: string
- slip10.ed25519.blake2b.index.SLIP10Ed25519Blake2bECC.ORDER¶
type: bigint
- slip10.ed25519.blake2b.index.SLIP10Ed25519Blake2bECC.POINT¶
type: typeof Point
- slip10.ed25519.blake2b.index.SLIP10Ed25519Blake2bECC.PRIVATE_KEY¶
type: typeof PrivateKey
- slip10.ed25519.blake2b.index.SLIP10Ed25519Blake2bECC.PUBLIC_KEY¶
type: typeof PublicKey
- class slip10.ed25519.blake2b.point.SLIP10Ed25519Blake2bPoint()¶
Represents a point on the SLIP10-Ed25519-Blake2b elliptic curve.
exported from
eccs.slip10.ed25519.blake2b.point- Extends:
SLIP10Ed25519Point
- slip10.ed25519.blake2b.point.SLIP10Ed25519Blake2bPoint.getName()¶
Returns the name of the elliptic curve point.
- Returns:
string – The curve name.
- class slip10.ed25519.blake2b.private-key.SLIP10Ed25519Blake2bPrivateKey()¶
Represents a SLIP10 Ed25519 Blake2b private key.
exported from
eccs.slip10.ed25519.blake2b.private-key- Extends:
PrivateKey
- slip10.ed25519.blake2b.private-key.SLIP10Ed25519Blake2bPrivateKey.getName()¶
Returns the name of the private key curve.
- Returns:
string – Curve name.
- slip10.ed25519.blake2b.private-key.SLIP10Ed25519Blake2bPrivateKey.getPublicKey()¶
Returns the corresponding public key.
- Returns:
PublicKey – The public key instance.
- slip10.ed25519.blake2b.private-key.SLIP10Ed25519Blake2bPrivateKey.getRaw()¶
Returns the raw private key bytes.
- Returns:
Uint8Array – Private key bytes.
- slip10.ed25519.blake2b.private-key.SLIP10Ed25519Blake2bPrivateKey.getUnderlyingObject()¶
Returns the underlying private key object.
- Returns:
any – Underlying key object.
- static slip10.ed25519.blake2b.private-key.SLIP10Ed25519Blake2bPrivateKey.fromBytes(privateKey)¶
Creates a private key instance from raw bytes.
- Arguments:
privateKey (Uint8Array) – The private key bytes.
- Returns:
PrivateKey – The private key instance.
- static slip10.ed25519.blake2b.private-key.SLIP10Ed25519Blake2bPrivateKey.getLength()¶
Returns the length of the private key in bytes.
- Returns:
number – Private key byte length.
- class slip10.ed25519.blake2b.public-key.SLIP10Ed25519Blake2bPublicKey()¶
Represents a SLIP10 Ed25519 Blake2b public key.
exported from
eccs.slip10.ed25519.blake2b.public-key- Extends:
SLIP10Ed25519PublicKey
- slip10.ed25519.blake2b.public-key.SLIP10Ed25519Blake2bPublicKey.getName()¶
Returns the name of the public key curve.
- Returns:
string – Curve name.
- slip10.ed25519.blake2b.public-key.SLIP10Ed25519Blake2bPublicKey.getPoint()¶
Returns the point associated with this public key.
- Returns:
Point – Point instance.
- class slip10.ed25519.monero.index.SLIP10Ed25519MoneroECC()¶
Represents the SLIP10 Ed25519 Monero elliptic curve.
exported from
eccs.slip10.ed25519.monero.index- Extends:
EllipticCurveCryptography
- slip10.ed25519.monero.index.SLIP10Ed25519MoneroECC.GENERATOR¶
type: Point
- slip10.ed25519.monero.index.SLIP10Ed25519MoneroECC.NAME¶
type: string
- slip10.ed25519.monero.index.SLIP10Ed25519MoneroECC.ORDER¶
type: bigint
- slip10.ed25519.monero.index.SLIP10Ed25519MoneroECC.POINT¶
type: typeof Point
- slip10.ed25519.monero.index.SLIP10Ed25519MoneroECC.PRIVATE_KEY¶
type: typeof PrivateKey
- slip10.ed25519.monero.index.SLIP10Ed25519MoneroECC.PUBLIC_KEY¶
type: typeof PublicKey
- class slip10.ed25519.monero.point.SLIP10Ed25519MoneroPoint()¶
Represents a point on the SLIP10 Ed25519 Monero elliptic curve.
exported from
eccs.slip10.ed25519.monero.point- Extends:
SLIP10Ed25519Point
- slip10.ed25519.monero.point.SLIP10Ed25519MoneroPoint.getName()¶
Get the name of the curve.
- Returns:
string – Curve name
- class slip10.ed25519.monero.private-key.SLIP10Ed25519MoneroPrivateKey()¶
Represents a private key for the SLIP10 Ed25519 Monero curve.
exported from
eccs.slip10.ed25519.monero.private-key- Extends:
SLIP10Ed25519PrivateKey
- slip10.ed25519.monero.private-key.SLIP10Ed25519MoneroPrivateKey.getName()¶
Get the name of the curve.
- Returns:
string – Curve name
- slip10.ed25519.monero.private-key.SLIP10Ed25519MoneroPrivateKey.getPublicKey()¶
Derive the corresponding public key from this private key.
- Returns:
PublicKey – The derived public key
- class slip10.ed25519.monero.public-key.SLIP10Ed25519MoneroPublicKey()¶
Represents a public key for the SLIP10 Ed25519 Monero curve.
exported from
eccs.slip10.ed25519.monero.public-key- Extends:
SLIP10Ed25519PublicKey
- slip10.ed25519.monero.public-key.SLIP10Ed25519MoneroPublicKey.getName()¶
Get the name of the curve.
- Returns:
string – Curve name
- slip10.ed25519.monero.public-key.SLIP10Ed25519MoneroPublicKey.getPoint()¶
Get the underlying point representation of the public key.
- Returns:
Point – The point corresponding to this public key
- slip10.ed25519.monero.public-key.SLIP10Ed25519MoneroPublicKey.getRawCompressed()¶
Get the compressed raw bytes of the public key.
- Returns:
Uint8Array – Compressed public key bytes
- static slip10.ed25519.monero.public-key.SLIP10Ed25519MoneroPublicKey.getCompressedLength()¶
Get the expected length of the compressed public key.
- Returns:
number – Length in bytes
- class slip10.nist256p1.index.SLIP10Nist256p1ECC()¶
Represents the SLIP10 NIST P-256 elliptic curve cryptography implementation.
exported from
eccs.slip10.nist256p1.index- Extends:
EllipticCurveCryptography
- slip10.nist256p1.index.SLIP10Nist256p1ECC.GENERATOR¶
type: Point
- slip10.nist256p1.index.SLIP10Nist256p1ECC.NAME¶
type: string
- slip10.nist256p1.index.SLIP10Nist256p1ECC.ORDER¶
type: bigint
- slip10.nist256p1.index.SLIP10Nist256p1ECC.POINT¶
type: typeof Point
- slip10.nist256p1.index.SLIP10Nist256p1ECC.PRIVATE_KEY¶
type: typeof PrivateKey
- slip10.nist256p1.index.SLIP10Nist256p1ECC.PUBLIC_KEY¶
type: typeof PublicKey
- class slip10.nist256p1.point.SLIP10Nist256p1Point()¶
Represents a point on the SLIP10 NIST P-256 elliptic curve.
exported from
eccs.slip10.nist256p1.point- Extends:
Point
- slip10.nist256p1.point.SLIP10Nist256p1Point.add(other)¶
Adds another point to this point.
- Arguments:
other (Point) – The point to add.
- Returns:
SLIP10Nist256p1Point – The resulting point.
- slip10.nist256p1.point.SLIP10Nist256p1Point.getName()¶
Returns the name of the curve point.
- Returns:
string – Curve point name.
- slip10.nist256p1.point.SLIP10Nist256p1Point.getRawDecoded()¶
Returns the point encoded as an uncompressed byte array (without leading 0x04).
- Returns:
Uint8Array – Uncompressed point bytes.
- slip10.nist256p1.point.SLIP10Nist256p1Point.getRawEncoded()¶
Returns the point encoded as a compressed byte array.
- Returns:
Uint8Array – Compressed point bytes.
- slip10.nist256p1.point.SLIP10Nist256p1Point.getUnderlyingObject()¶
Returns the underlying curve point object.
- Returns:
any – Underlying point object.
- slip10.nist256p1.point.SLIP10Nist256p1Point.getX()¶
Returns the X coordinate of the point.
- Returns:
bigint – X coordinate.
- slip10.nist256p1.point.SLIP10Nist256p1Point.getY()¶
Returns the Y coordinate of the point.
- Returns:
bigint – Y coordinate.
- slip10.nist256p1.point.SLIP10Nist256p1Point.multiply(scalar)¶
Multiplies this point by a scalar.
- Arguments:
scalar (bigint) – The scalar to multiply by.
- Returns:
SLIP10Nist256p1Point – The resulting point.
- static slip10.nist256p1.point.SLIP10Nist256p1Point.fromBytes(point)¶
Creates a point from raw bytes.
- Arguments:
point (Uint8Array) – The byte array representing the point.
- Returns:
Point – The curve point instance.
- static slip10.nist256p1.point.SLIP10Nist256p1Point.fromCoordinates(x, y)¶
Creates a point from x and y coordinates.
- Arguments:
x (bigint) – X coordinate.
y (bigint) – Y coordinate.
- Returns:
Point – The curve point instance.
- class slip10.nist256p1.private-key.SLIP10Nist256p1PrivateKey()¶
Represents a private key on the SLIP10 NIST P-256 elliptic curve.
exported from
eccs.slip10.nist256p1.private-key- Extends:
PrivateKey
- slip10.nist256p1.private-key.SLIP10Nist256p1PrivateKey.getName()¶
Returns the name of the private key curve.
- Returns:
string – Curve name.
- slip10.nist256p1.private-key.SLIP10Nist256p1PrivateKey.getPublicKey()¶
Derives the public key corresponding to this private key.
- Returns:
PublicKey – The associated public key.
- slip10.nist256p1.private-key.SLIP10Nist256p1PrivateKey.getRaw()¶
Returns the raw private key bytes.
- Returns:
Uint8Array – Private key as bytes.
- slip10.nist256p1.private-key.SLIP10Nist256p1PrivateKey.getUnderlyingObject()¶
Returns the underlying private key object.
- Returns:
any – Underlying private key object.
- static slip10.nist256p1.private-key.SLIP10Nist256p1PrivateKey.fromBytes(privateKey)¶
Creates a private key from raw bytes.
- Arguments:
privateKey (Uint8Array) – Raw private key bytes.
- Returns:
SLIP10Nist256p1PrivateKey – The private key instance.
- static slip10.nist256p1.private-key.SLIP10Nist256p1PrivateKey.getLength()¶
Returns the byte length of the private key.
- Returns:
number – Length in bytes.
- class slip10.nist256p1.public-key.SLIP10Nist256p1PublicKey()¶
Represents a public key on the SLIP10 NIST P-256 elliptic curve.
exported from
eccs.slip10.nist256p1.public-key- Extends:
PublicKey
- slip10.nist256p1.public-key.SLIP10Nist256p1PublicKey.getName()¶
Returns the name of the public key curve.
- Returns:
string – Curve name.
- slip10.nist256p1.public-key.SLIP10Nist256p1PublicKey.getPoint()¶
Returns the elliptic curve point corresponding to the public key.
- Returns:
Point – Elliptic curve point.
- slip10.nist256p1.public-key.SLIP10Nist256p1PublicKey.getRaw()¶
Returns the raw bytes of the public key (default: compressed).
- Returns:
Uint8Array – Raw key bytes.
- slip10.nist256p1.public-key.SLIP10Nist256p1PublicKey.getRawCompressed()¶
Returns the compressed raw bytes of the public key.
- Returns:
Uint8Array – Compressed key bytes.
- slip10.nist256p1.public-key.SLIP10Nist256p1PublicKey.getRawUncompressed()¶
Returns the uncompressed raw bytes of the public key.
- Returns:
Uint8Array – Uncompressed key bytes.
- slip10.nist256p1.public-key.SLIP10Nist256p1PublicKey.getUnderlyingObject()¶
Returns the underlying public key object.
- Returns:
any – Underlying public key object.
- static slip10.nist256p1.public-key.SLIP10Nist256p1PublicKey.fromBytes(publicKey)¶
Creates a public key from raw bytes.
- Arguments:
publicKey (Uint8Array) – Raw public key bytes.
- Returns:
PublicKey – Public key instance.
- static slip10.nist256p1.public-key.SLIP10Nist256p1PublicKey.fromPoint(point)¶
Creates a public key from a point.
- Arguments:
point (Point) – Elliptic curve point.
- Returns:
PublicKey – Public key instance.
- static slip10.nist256p1.public-key.SLIP10Nist256p1PublicKey.getCompressedLength()¶
Returns the length of the compressed public key in bytes.
- Returns:
number – Compressed key length.
- static slip10.nist256p1.public-key.SLIP10Nist256p1PublicKey.getUncompressedLength()¶
Returns the length of the uncompressed public key in bytes.
- Returns:
number – Uncompressed key length.
- class slip10.secp256k1.index.SLIP10Secp256k1ECC()¶
Represents the SLIP10 Secp256k1 elliptic curve cryptography.
exported from
eccs.slip10.secp256k1.index- Extends:
EllipticCurveCryptography
- slip10.secp256k1.index.SLIP10Secp256k1ECC.GENERATOR¶
type: Point
- slip10.secp256k1.index.SLIP10Secp256k1ECC.NAME¶
type: string
- slip10.secp256k1.index.SLIP10Secp256k1ECC.ORDER¶
type: bigint
- slip10.secp256k1.index.SLIP10Secp256k1ECC.POINT¶
type: typeof Point
- slip10.secp256k1.index.SLIP10Secp256k1ECC.PRIVATE_KEY¶
type: typeof PrivateKey
- slip10.secp256k1.index.SLIP10Secp256k1ECC.PUBLIC_KEY¶
type: typeof PublicKey
- class slip10.secp256k1.point.SLIP10Secp256k1Point()¶
Represents a point on the SLIP10 Secp256k1 elliptic curve.
exported from
eccs.slip10.secp256k1.point- Extends:
Point
- slip10.secp256k1.point.SLIP10Secp256k1Point.add(point)¶
Adds another point to this point.
- Arguments:
point (Point) – Point to add.
- Returns:
Point – Resulting point.
- slip10.secp256k1.point.SLIP10Secp256k1Point.getName()¶
Returns the name of the elliptic curve.
- Returns:
string – Curve name.
- slip10.secp256k1.point.SLIP10Secp256k1Point.getRawDecoded()¶
Returns the decoded raw bytes of the point (uncompressed, without prefix).
- Returns:
Uint8Array – Uncompressed point bytes.
- slip10.secp256k1.point.SLIP10Secp256k1Point.getRawEncoded()¶
Returns the encoded raw bytes of the point (compressed).
- Returns:
Uint8Array – Compressed point bytes.
- slip10.secp256k1.point.SLIP10Secp256k1Point.getUnderlyingObject()¶
Returns the underlying point object.
- Returns:
any – Underlying point object.
- slip10.secp256k1.point.SLIP10Secp256k1Point.getX()¶
Returns the X coordinate of the point.
- Returns:
bigint – X coordinate.
- slip10.secp256k1.point.SLIP10Secp256k1Point.getY()¶
Returns the Y coordinate of the point.
- Returns:
bigint – Y coordinate.
- slip10.secp256k1.point.SLIP10Secp256k1Point.multiply(scalar)¶
Multiplies this point by a scalar.
- Arguments:
scalar (bigint) – Scalar value.
- Returns:
Point – Resulting point.
- static slip10.secp256k1.point.SLIP10Secp256k1Point.fromBytes(point)¶
Creates a point from raw bytes.
- Arguments:
point (Uint8Array) – Raw point bytes.
- Returns:
Point – Point instance.
- static slip10.secp256k1.point.SLIP10Secp256k1Point.fromCoordinates(x, y)¶
Creates a point from coordinates.
- Arguments:
x (bigint) – X coordinate.
y (bigint) – Y coordinate.
- Returns:
Point – Point instance.
- class slip10.secp256k1.private-key.SLIP10Secp256k1PrivateKey()¶
Represents a SLIP10 Secp256k1 private key.
exported from
eccs.slip10.secp256k1.private-key- Extends:
PrivateKey
- slip10.secp256k1.private-key.SLIP10Secp256k1PrivateKey.getName()¶
Returns the name of the elliptic curve.
- Returns:
string – Curve name.
- slip10.secp256k1.private-key.SLIP10Secp256k1PrivateKey.getPublicKey()¶
Returns the corresponding public key for this private key.
- Returns:
PublicKey – Public key instance.
- slip10.secp256k1.private-key.SLIP10Secp256k1PrivateKey.getRaw()¶
Returns the raw bytes of the private key.
- Returns:
Uint8Array – Raw private key bytes.
- slip10.secp256k1.private-key.SLIP10Secp256k1PrivateKey.getUnderlyingObject()¶
Returns the underlying private key object.
- Returns:
any – Underlying private key object.
- static slip10.secp256k1.private-key.SLIP10Secp256k1PrivateKey.fromBytes(privateKey)¶
Creates a private key from raw bytes.
- Arguments:
privateKey (Uint8Array) – Raw private key bytes.
- Returns:
PrivateKey – Private key instance.
- static slip10.secp256k1.private-key.SLIP10Secp256k1PrivateKey.getLength()¶
Returns the length of the private key in bytes.
- Returns:
number – Private key byte length.
- class slip10.secp256k1.public-key.SLIP10Secp256k1PublicKey()¶
Represents a SLIP10 Secp256k1 public key.
exported from
eccs.slip10.secp256k1.public-key- Extends:
PublicKey
- slip10.secp256k1.public-key.SLIP10Secp256k1PublicKey.getName()¶
Returns the name of the elliptic curve.
- Returns:
string – Curve name.
- slip10.secp256k1.public-key.SLIP10Secp256k1PublicKey.getPoint()¶
Returns the corresponding Point instance of this public key.
- Returns:
Point – Elliptic curve point.
- slip10.secp256k1.public-key.SLIP10Secp256k1PublicKey.getRaw()¶
Returns the default raw bytes (compressed) of the public key.
- Returns:
Uint8Array – Raw public key bytes.
- slip10.secp256k1.public-key.SLIP10Secp256k1PublicKey.getRawCompressed()¶
Returns the compressed raw bytes of the public key.
- Returns:
Uint8Array – Compressed public key bytes.
- slip10.secp256k1.public-key.SLIP10Secp256k1PublicKey.getRawUncompressed()¶
Returns the uncompressed raw bytes of the public key.
- Returns:
Uint8Array – Uncompressed public key bytes.
- slip10.secp256k1.public-key.SLIP10Secp256k1PublicKey.getUnderlyingObject()¶
Returns the underlying public key object.
- Returns:
any – Underlying public key object.
- static slip10.secp256k1.public-key.SLIP10Secp256k1PublicKey.fromBytes(publicKey)¶
Creates a public key from raw bytes.
- Arguments:
publicKey (Uint8Array) – Raw public key bytes.
- Returns:
PublicKey – Public key instance.
- static slip10.secp256k1.public-key.SLIP10Secp256k1PublicKey.fromPoint(point)¶
Creates a public key from a Point instance.
- Arguments:
point (Point) – Elliptic curve point.
- Returns:
PublicKey – Public key instance.
- static slip10.secp256k1.public-key.SLIP10Secp256k1PublicKey.getCompressedLength()¶
Returns the length of a compressed public key in bytes.
- Returns:
number – Compressed key length.
- static slip10.secp256k1.public-key.SLIP10Secp256k1PublicKey.getUncompressedLength()¶
Returns the length of an uncompressed public key in bytes.
- Returns:
number – Uncompressed key length.