Files
salvium-rs/node_modules/@noble/curves/abstract/montgomery.d.ts
T
Matt Hess 2c128eb1c0 Add Bulletproofs+ range proof verification (pure JavaScript)
- Implement BP+ verification using @noble/curves for Ed25519 ops
  - MSM 256 points in ~420ms - mobile-friendly, no WASM needed
  - Add verifyBulletproofPlus, verifyBulletproofPlusBatch, verifyRangeProof
  - Add generator initialization with caching (Gi, Hi points)
  - 24 new tests including performance benchmarks
  - Update exports in index.js and package.json
  - Bump version to 0.3.0
2026-01-15 02:09:51 +00:00

25 lines
917 B
TypeScript

import { type CurveLengths } from './curve.ts';
export type MontgomeryOpts = {
P: bigint;
type: 'x25519' | 'x448';
adjustScalarBytes: (bytes: Uint8Array) => Uint8Array;
powPminus2: (x: bigint) => bigint;
randomBytes?: (bytesLength?: number) => Uint8Array;
};
export type MontgomeryECDH = {
scalarMult: (scalar: Uint8Array, u: Uint8Array) => Uint8Array;
scalarMultBase: (scalar: Uint8Array) => Uint8Array;
getSharedSecret: (secretKeyA: Uint8Array, publicKeyB: Uint8Array) => Uint8Array;
getPublicKey: (secretKey: Uint8Array) => Uint8Array;
utils: {
randomSecretKey: () => Uint8Array;
};
GuBytes: Uint8Array;
lengths: CurveLengths;
keygen: (seed?: Uint8Array) => {
secretKey: Uint8Array;
publicKey: Uint8Array;
};
};
export declare function montgomery(curveDef: MontgomeryOpts): MontgomeryECDH;
//# sourceMappingURL=montgomery.d.ts.map