Development Artifact Cleanup: ✅ BROTHER_NODE REORGANIZATION: Moved development test node to appropriate location - dev/test-nodes/brother_node/: Moved from root directory for better organization - Contains development configuration, test logs, and test chain data - No impact on production systems - purely development/testing artifact ✅ DEVELOPMENT ARTIFACTS IDENTIFIED: - Chain ID: aitbc-brother-chain (test/development chain) - Ports: 8010 (P2P) and 8011 (RPC) - different from production - Environment: .env file with test configuration - Logs: rpc.log and node.log from development testing session (March 15, 2026) ✅ ROOT DIRECTORY CLEANUP: Removed development clutter from production directory - brother_node/ moved to dev/test-nodes/brother_node/ - Root directory now contains only production-ready components - Development artifacts properly organized in dev/ subdirectory DIRECTORY STRUCTURE IMPROVEMENT: 📁 dev/test-nodes/: Development and testing node configurations 🏗️ Root Directory: Clean production structure with only essential components 🧪 Development Isolation: Test environments separated from production BENEFITS: ✅ Clean Production Directory: No development artifacts in root ✅ Better Organization: Development nodes grouped in dev/ subdirectory ✅ Clear Separation: Production vs development environments clearly distinguished ✅ Maintainability: Easier to identify and manage development components RESULT: Successfully moved brother_node development artifact to dev/test-nodes/ subdirectory, cleaning up the root directory while preserving development testing environment for future use.
42 lines
1.7 KiB
JavaScript
Executable File
42 lines
1.7 KiB
JavaScript
Executable File
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
import { createCurve } from './_shortw_utils.js';
|
|
import { sha256 } from '@noble/hashes/sha256';
|
|
import { Field } from './abstract/modular.js';
|
|
import { mapToCurveSimpleSWU } from './abstract/weierstrass.js';
|
|
import { createHasher } from './abstract/hash-to-curve.js';
|
|
// NIST secp256r1 aka p256
|
|
// https://www.secg.org/sec2-v2.pdf, https://neuromancer.sk/std/nist/P-256
|
|
const Fp = Field(BigInt('0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff'));
|
|
const CURVE_A = Fp.create(BigInt('-3'));
|
|
const CURVE_B = BigInt('0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b');
|
|
// prettier-ignore
|
|
export const p256 = createCurve({
|
|
a: CURVE_A,
|
|
b: CURVE_B,
|
|
Fp,
|
|
// Curve order, total count of valid points in the field
|
|
n: BigInt('0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551'),
|
|
// Base (generator) point (x, y)
|
|
Gx: BigInt('0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296'),
|
|
Gy: BigInt('0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5'),
|
|
h: BigInt(1),
|
|
lowS: false,
|
|
}, sha256);
|
|
export const secp256r1 = p256;
|
|
const mapSWU = /* @__PURE__ */ (() => mapToCurveSimpleSWU(Fp, {
|
|
A: CURVE_A,
|
|
B: CURVE_B,
|
|
Z: Fp.create(BigInt('-10')),
|
|
}))();
|
|
const htf = /* @__PURE__ */ (() => createHasher(secp256r1.ProjectivePoint, (scalars) => mapSWU(scalars[0]), {
|
|
DST: 'P256_XMD:SHA-256_SSWU_RO_',
|
|
encodeDST: 'P256_XMD:SHA-256_SSWU_NU_',
|
|
p: Fp.ORDER,
|
|
m: 1,
|
|
k: 128,
|
|
expand: 'xmd',
|
|
hash: sha256,
|
|
}))();
|
|
export const hashToCurve = /* @__PURE__ */ (() => htf.hashToCurve)();
|
|
export const encodeToCurve = /* @__PURE__ */ (() => htf.encodeToCurve)();
|
|
//# sourceMappingURL=p256.js.map
|