UNPKG

@gandlaf21/blind-signature

Version:

`@gandlaf21/blind-signature` is a JavaScript Module implementing blind signatures using `@noble/secp256k1` elliptic curve.

23 lines (22 loc) 700 B
import { Point } from "@noble/secp256k1"; /** * Takes a secret, hashes it, and maps the hash to a point on the elliptic curve * @param secret a secret message. Should be random, to improve security. * @returns Point on elliptic curve. */ declare function hashToCurve(secret: Uint8Array): Promise<Point>; /** * Converts byte array to bigint * @param bytes * @returns */ declare function bytesToNumber(bytes: Uint8Array): bigint; /** * * @param hex * @returns */ declare function hexToNumber(hex: string): bigint; declare function pointToHex(point: Point): string; declare function hexToPoint(hex: string): Point; export { hashToCurve, bytesToNumber, hexToNumber, pointToHex, hexToPoint };