Skip to content

Instantly share code, notes, and snippets.

View OlivierKobialka's full-sized avatar

OlivierKobialka

View GitHub Profile
import * as crypto from "crypto";
export function keyPair(): { publicKey: string; privateKey: string } {
const a: bigint = 0n;
const b: bigint = 7n;
const p: bigint = 2n ** 256n - 2n ** 32n - 977n;
const n: bigint =
115792089237316195423570985008687907852837564279074904382605163141518161494337n;
const g = {