{"_id":"@cypher-laboratory/alicesring-lsag","_rev":"7-ee8bdd2a219cad0337c75f471152bc4f","name":"@cypher-laboratory/alicesring-lsag","dist-tags":{"latest":"0.1.2","snap":"0.1.1"},"versions":{"0.0.1":{"name":"@cypher-laboratory/alicesring-lsag","version":"0.0.1","description":"A TypeScript implementation of LSAG ring signatures.","main":"dist/src/index.js","module":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/Cypher-Laboratory/PrivateAirdropClaim.git"},"scripts":{"build":"npm run fmt && rm -r ./dist && tsc","test":"jest","lint":"eslint .","lint:fix":"eslint . --fix","prettier":"prettier --check .","prettier:fix":"prettier --write .","fmt:check":"npm run prettier && npm run lint","fmt":"npm run prettier:fix && npm run fmt:check"},"author":{"name":"Elli610 && LeJamon && maximedgr"},"license":"MIT","dependencies":{"@noble/hashes":"^1.3.2","crypto-browserify":"^3.12.0","ts-node":"^10.9.1"},"devDependencies":{"@types/jest":"^29.5.7","@types/node":"^20.8.7","@typescript-eslint/eslint-plugin":"^5.61.0","@typescript-eslint/parser":"^5.61.0","eslint":"^8.44.0","jest":"^29.7.0","prettier":"^3.0.0","ts-jest":"^29.1.1"},"_id":"@cypher-laboratory/alicesring-lsag@0.0.1","gitHead":"8dfe01512e35a032d7eaf44c5308539a9b006d81","bugs":{"url":"https://github.com/Cypher-Laboratory/PrivateAirdropClaim/issues"},"homepage":"https://github.com/Cypher-Laboratory/PrivateAirdropClaim#readme","_nodeVersion":"20.5.0","_npmVersion":"9.8.0","dist":{"integrity":"sha512-EHUuy9R4N8+rdubzmrfqOch4qdLRolB6eqVAew1syG8M7NLqw4EapXspy2twyLgLPPMfFx05SsDmYYsUsv4ZxQ==","shasum":"bd138f17079e8e0181fe1fb2354148569dcf3675","tarball":"https://registry.npmjs.org/@cypher-laboratory/alicesring-lsag/-/alicesring-lsag-0.0.1.tgz","fileCount":101,"unpackedSize":371240,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEoqGPapITU9FKg4AAAu7uoqGqFvnrtKozqhkCawApRQAiBmkZwzatFkfSiNEwaBv2ECESwBqSs6TKl+ejypDYU3ig=="}]},"_npmUser":{"name":"elli610","email":"niktoua256@gmail.com"},"directories":{},"maintainers":[{"name":"lejamon","email":"lejamon.c@protonmail.com"},{"name":"elli610","email":"niktoua256@gmail.com"},{"name":"cypherlaboratory","email":"cypherlabsas@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alicesring-lsag_0.0.1_1713344219758_0.049598953740147556"},"_hasShrinkwrap":false},"0.0.2":{"name":"@cypher-laboratory/alicesring-lsag","version":"0.0.2","description":"A TypeScript implementation of LSAG ring signatures.","main":"dist/src/index.js","module":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/Cypher-Laboratory/PrivateAirdropClaim.git"},"scripts":{"build":"npm run fmt && rm -r ./dist && tsc","test":"jest","lint":"eslint .","lint:fix":"eslint . --fix","prettier":"prettier --check .","prettier:fix":"prettier --write .","fmt:check":"npm run prettier && npm run lint","fmt":"npm run prettier:fix && npm run fmt:check"},"author":{"name":"Elli610 && LeJamon && maximedgr"},"license":"MIT","dependencies":{"@noble/hashes":"^1.3.2","crypto-browserify":"^3.12.0","ts-node":"^10.9.1"},"devDependencies":{"@types/jest":"^29.5.7","@types/node":"^20.8.7","@typescript-eslint/eslint-plugin":"^5.61.0","@typescript-eslint/parser":"^5.61.0","eslint":"^8.44.0","jest":"^29.7.0","prettier":"^3.0.0","ts-jest":"^29.1.1"},"_id":"@cypher-laboratory/alicesring-lsag@0.0.2","gitHead":"8dfe01512e35a032d7eaf44c5308539a9b006d81","bugs":{"url":"https://github.com/Cypher-Laboratory/PrivateAirdropClaim/issues"},"homepage":"https://github.com/Cypher-Laboratory/PrivateAirdropClaim#readme","_nodeVersion":"21.7.3","_npmVersion":"10.5.0","dist":{"integrity":"sha512-gL8tGfHaqBLzB/tH7xZQMDRJJKlKhDWyJS0Y8mp1BTnts1AgdLAdiIKGuPE3MWyqCkFqVONIX4ZpLOeKM8rHQw==","shasum":"7c9559791a961b2e568c8f1400cdc7e2f0a311c3","tarball":"https://registry.npmjs.org/@cypher-laboratory/alicesring-lsag/-/alicesring-lsag-0.0.2.tgz","fileCount":101,"unpackedSize":371404,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+bFjU7e08jRsxaSjyLCrfPLHOULDBCnYy0wvK7Jkg1AIgX1UQhCAhGs+G5tvku73mFpc6xgh4arZdhMnLEpC8dqI="}]},"_npmUser":{"name":"elli610","email":"niktoua256@gmail.com"},"directories":{},"maintainers":[{"name":"lejamon","email":"lejamon.c@protonmail.com"},{"name":"elli610","email":"niktoua256@gmail.com"},{"name":"cypherlaboratory","email":"cypherlabsas@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alicesring-lsag_0.0.2_1713346322115_0.7344675631377231"},"_hasShrinkwrap":false},"0.0.3":{"name":"@cypher-laboratory/alicesring-lsag","version":"0.0.3","description":"A TypeScript implementation of LSAG ring signatures.","main":"dist/src/index.js","module":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/Cypher-Laboratory/PrivateAirdropClaim.git"},"scripts":{"build":"npm run fmt && rm -r ./dist && tsc","test":"jest","lint":"eslint .","lint:fix":"eslint . --fix","prettier":"prettier --check .","prettier:fix":"prettier --write .","fmt:check":"npm run prettier && npm run lint","fmt":"npm run prettier:fix && npm run fmt:check"},"author":{"name":"Elli610 && LeJamon && maximedgr"},"license":"MIT","dependencies":{"@noble/hashes":"^1.3.2","crypto-browserify":"^3.12.0","ts-node":"^10.9.1"},"devDependencies":{"@types/jest":"^29.5.7","@types/node":"^20.8.7","@typescript-eslint/eslint-plugin":"^5.61.0","@typescript-eslint/parser":"^5.61.0","eslint":"^8.44.0","jest":"^29.7.0","prettier":"^3.0.0","ts-jest":"^29.1.1"},"_id":"@cypher-laboratory/alicesring-lsag@0.0.3","gitHead":"8dfe01512e35a032d7eaf44c5308539a9b006d81","bugs":{"url":"https://github.com/Cypher-Laboratory/PrivateAirdropClaim/issues"},"homepage":"https://github.com/Cypher-Laboratory/PrivateAirdropClaim#readme","_nodeVersion":"21.7.3","_npmVersion":"10.5.0","dist":{"integrity":"sha512-vTO8w8ifNjm8gN9iddLzOldPA/bw8AhKtcTigHgrzjOcK27x59BNGurZnd1uABnlGg9IcH12lNQhwdthQjx5Eg==","shasum":"87ed92e12cc6eb793733c7e044f9f2e6a82661f7","tarball":"https://registry.npmjs.org/@cypher-laboratory/alicesring-lsag/-/alicesring-lsag-0.0.3.tgz","fileCount":101,"unpackedSize":372269,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0p5/NqDt2ns9mm5dqfWYNXYyHPu9bEtbMr5NO9KvxWQIgKlrLK+zw0Qxn5q+RuZOUo1gLXN8XnNh2DKh9a1fDbyk="}]},"_npmUser":{"name":"elli610","email":"niktoua256@gmail.com"},"directories":{},"maintainers":[{"name":"lejamon","email":"lejamon.c@protonmail.com"},{"name":"elli610","email":"niktoua256@gmail.com"},{"name":"cypherlaboratory","email":"cypherlabsas@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alicesring-lsag_0.0.3_1713347084276_0.15227850507996754"},"_hasShrinkwrap":false},"0.0.4":{"name":"@cypher-laboratory/alicesring-lsag","version":"0.0.4","description":"A TypeScript implementation of LSAG ring signatures. This implementation, only supports sec9256k1 and is made to be used in metamask snap","main":"dist/src/index.js","module":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/Cypher-Laboratory/PrivateAirdropClaim.git"},"scripts":{"build":"npm run fmt && rm -r ./dist && tsc","test":"jest","lint":"eslint .","lint:fix":"eslint . --fix","prettier":"prettier --check .","prettier:fix":"prettier --write .","fmt:check":"npm run prettier && npm run lint","fmt":"npm run prettier:fix && npm run fmt:check"},"author":{"name":"Elli610 && LeJamon && maximedgr"},"license":"MIT","dependencies":{"@noble/hashes":"^1.3.2","crypto-browserify":"^3.12.0","ts-node":"^10.9.1"},"devDependencies":{"@types/jest":"^29.5.7","@types/node":"^20.8.7","@typescript-eslint/eslint-plugin":"^5.61.0","@typescript-eslint/parser":"^5.61.0","eslint":"^8.44.0","jest":"^29.7.0","prettier":"^3.0.0","ts-jest":"^29.1.1"},"_id":"@cypher-laboratory/alicesring-lsag@0.0.4","readme":"# types-Ring-Signature\n\nThis repository contains a TypeScript implementation of the [Ring Signature](https://en.wikipedia.org/wiki/Ring_signature) algorithm using Spontaneous Anonymous Group (SAG).\n\n## About the implementation\n\nThe implementation is based on the [SAG algorithm](https://eprint.iacr.org/2004/027.pdf) and uses the [Elliptic Curve Cryptography](https://en.wikipedia.org/wiki/Elliptic-curve_cryptography) (ECC) to generate the keys and sign the message.\n\nWe used the implementation proposed in [Zero to Monero](https://www.getmonero.org/library/Zero-to-Monero-2-0-0.pdf) (p.36) as a reference.\n\n## Audit\n\nThe audit of this library was conducted by the company CryptoExperts [https://www.cryptoexperts.com/](https://www.cryptoexperts.com/) on March 13th, 2024. All vulnerabilities identified in the course of the audit have been fixed in agreement and under the supervision of CryptoExperts.\n\n## Usage\n\n```typescript\nimport {\n  RingSignature,\n  Curve,\n  CurveName,\n  Point,\n} from \"@cypherlab/types-ring-signature\";\n\nconst curve: Curve = new Curve(CurveName.SECP256K1);\nconst ring: Point[] = []; // your ring of public keys\nconst message = \"Hello World!\";\n\nconst signerPrivateKey = BigInt(\"your private key\");\n\n// Sign\nconst signature: RingSignature = RingSignature.sign(\n  ring,\n  signerPrivateKey,\n  message,\n  curve,\n);\n\n// Verify\nconsole.log(\"Is signature verified? \", signature.verify());\n\n// Export to jsonString\nconst jsonString = signature.toJsonString();\n\n// Import from jsonString\nconst retrievedFromJson = RingSignature.fromJsonString(jsonString);\n```\n\n## Dependencies\n\n| Dependency    | Version | repo                                                | audit report                                                | dependencies                                                              |\n| ------------- | ------- | --------------------------------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------- |\n| @noble/hashes | ^1.3.2  | [GitHub](https://github.com/paulmillr/noble-hashes) | [Report](https://cure53.de/pentest-report_hashing-libs.pdf) | [NPM](https://www.npmjs.com/package/@noble/hashes?activeTab=dependencies) |\n\n## Dev Dependencies\n\n| Dev Dependency                   | Version | Repository                                                                          |\n| -------------------------------- | ------- | ----------------------------------------------------------------------------------- |\n| @types/jest                      | ^29.5.7 | [GitHub](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest) |\n| @types/node                      | ^20.8.7 | [GitHub](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) |\n| @typescript-eslint/eslint-plugin | ^5.61.0 | [GitHub](https://github.com/typescript-eslint/typescript-eslint)                    |\n| @typescript-eslint/parser        | ^5.61.0 | [GitHub](https://github.com/typescript-eslint/typescript-eslint)                    |\n| eslint                           | ^8.44.0 | [GitHub](https://github.com/eslint/eslint)                                          |\n| jest                             | ^29.7.0 | [GitHub](https://github.com/facebook/jest)                                          |\n| prettier                         | ^3.0.0  | [GitHub](https://github.com/prettier/prettier)                                      |\n| ts-jest                          | ^29.1.1 | [GitHub](https://github.com/kulshekhar/ts-jest)                                     |\n| ts-node                          | ^10.9.1 | [GitHub](https://github.com/TypeStrong/ts-node)                                     |\n\n## Spontaneous Anonymous Group (SAG) Signatures\n\n### Group Setup\n\nWhen setting up a group for cryptographic purposes, such as for a Spontaneous Anonymous Group (SAG) signature scheme, there are two primary methods to establish the group members' public keys:\n\n- **using existing public keys** of the members from publicly available data such as blockchains. This method is suitable for scenarios where the group members have a common caracteristics, such as being part of the same organization or having a specific role. For example, a group of members of a company's board of directors can be identified by their public keys, which are publicly available on the company's website.\n- **using a group key generation algorithm** to generate the public keys of the members. This method is suitable for scenarios where the group members are not known in advance, such as in a voting system. For example, a group of voters can be identified by their public keys, which are generated by the voting system's key generation algorithm.\n\n### Signature Generation\n\nLet $l$ be the number of members in the group.  \nLet $R$ be a set of public keys of the group members such as $R$ = { $K_{0}$ , $K_{1}$ , ..., $K_{n}$ } where n be the number of members in the group minus 1 ($l = n + 1$).  \nLet $m$ be the digest of the message to be signed.  \nLet $H$ be a hash function.  \nLet $k$ be a random integer in the range $[1, N-1]$. This is the private key of the signer.  \nLet $\\pi$ be the signer position in the group. This is a random integer in the range $[0, n]$.\n\nThe signer computes the following:\n\n- Generates a random integer $\\alpha$ in the range [1, N-1]\n- Generates random responses _r_ = { $r_{0}$ , $r_{1}$ , ... , $r_{\\pi-1}$, $r_{\\pi+1}$, ... , $r_{n}$ } where $r_{i}$ ($0 <= i <= n$ excluding $\\pi$) is a random integer in the range $[1, N-1]$\n- Computes $c_{\\pi+1} = H(R, m, [\\alpha G])$\n- For $j$ in $[\\pi + 1, l + \\pi]$ computes the following:\n  - $i = mod(j, l)$ -> allows to loop over the group members\n  - $s = i - 1$ if $i > 0$ else $l - 1$ -> $s = i - 1$ except when $i = 0$. In this case, $s = l - 1$\n  - $c_{i+1} = H(R, m, [r_{s}G + c_{s}K_{s}])$\n- Define the signer's response to verify $\\alpha = r_{\\pi} + c_{\\pi}k$ ($mod$ $N$)\n\nThe signature contains the following:\n\n- the ring of public keys $R$\n- the challenge $c_{1}$\n- the responses $r$ = { $r_{0}$ , $r_{1}$ , ... , $r_{n}$ }\n\n### Signature Verification\n\nKnown data:\n\n- the ring of public keys $R$\n- the seed $c_{0}$\n- the responses $r$ = { $r_{0}$ , $r_{1}$ , ... , $r_{n}$ }\n- the message $m$\n\nThe signature is valid if and only if the signature has been generated using one of the group member's private keys.\n\nThe verifier computes the following:\n\n- For $i = 2$ to $n$, with $i$ wrapping around to 1 after $n$:\n  - $c_{i}$' = $H( R, m, [ r_{i-1} G$ + $c_{i-1}$' $K_{i-1}$]) if $i ≠ 1$ else $c_{i}$' = $H(R, m, [r_{1}G + c_{1}K_{1}])$\n- If $c_{1}$' = $c_{1}$ then the signature is valid, else it is invalid.\n\n## Detailed implementation\n\n### RingSignature.sign\n\nThis method is designed to compute a ring signature by directly utilizing a private key as input. It's tailored for scenarios where you do not use a wallet for key management. The RingSignature.sign function needs the private key to generate the ring signature.\n\n#### 1. Sort the ring by x ascending (and y ascending if x is equal)\n\nLet $\\pi$ be the signer position in the group. This is an integer in the range $[0, n]$.\n\n#### 2. Generate Random Number $\\alpha$\n\nIt will be use as the nonce.\n\n- **Function:** `randomBigint`\n- **Location:** `src/utils/randomNumber.ts`\n- **Description:** Generates a random bigint in the range [1, max[.\n\n```typescript\nexport function randomBigint(max: bigint): bigint;\n```\n\n#### 3. Compute $c_{\\pi+1}$\n\n$c_{\\pi+1} = H(R, m, [\\alpha G])$\n\n- **Function:** `computeC`\n- **Location:** `src/ringSignatures.ts`\n- **Description:** Compute a c value.\n- **Remarks:**\n  - This function is used to compute the c value of a ring-signature.\n  - Either 'alpha' or all the other keys of 'params' must be set..\n\n```typescript\n  private static computeC(\n    ring: Point[],\n    messageDigest: bigint,\n    params: {\n      previousR?: bigint;\n      previousC?: bigint;\n      previousPubKey?: Point;\n      alpha?: bigint;\n    },\n    curve: Curve,\n    config?: SignatureConfig,\n  ): bigint\n```\n\n#### 4. Compute the challenges.\n\nGenerates random responses _r_ = {$r_{1}$, ... , $r_{\\pi-1}$, $r_{\\pi+1}$, ... , $r_{n}$ } where $r_{i}$ ($0 <= i <= n$ excluding $\\pi$) is a random integer in the range $[1, N-1]$  \nFor i = ${\\pi+1}$, ${\\pi+2}$ , ..., n, 1, 2, ..., ${\\pi-1}$ calculate, replacing n + 1 → 1,\n\n$c_{i+1} = H(R, m, [r_{s}G - c_{s}K_{s}])$\n\n- **Function:** `RingSignature.signature`\n- **Location:** `src/ringSignature.ts`\n- **Description:** Generate an incomplete ring signature.\n\n```typescript\n  private static signature(\n    curve: Curve,\n    ring: Point[],\n    ceePiPlusOne: bigint,\n    signerIndex: number,\n    messageDigest: bigint,\n    config?: SignatureConfig,\n  ): {\n    ring: Point[];\n    cees: bigint[];\n    signerIndex: number;\n    responses: bigint[];\n  }\n```\n\n#### 5. Compute the signer response $r_{\\pi}$\n\n$r_{\\pi}$ such that $\\alpha = r_{\\pi} - c_{\\pi}k$ ($mod$ $N$).\n\n- **Function:** `piSignature`\n- **Location:** `src/signature/piSignature.ts`\n- **Description:** Compute the signature from the actual signer.\n\n```typescript\nexport function piSignature(\n  alpha: bigint,\n  c: bigint,\n  signerPrivKey: bigint,\n  curve: Curve,\n): bigint;\n```\n\n#### 6. Return the ring signature\n\nReturn the ring-signature.\n\n- **Function:** `constructor`\n- **Location:** `src/ringSignature.ts`\n- **Description:** Ring signature class constructor.\n\n```typescript\n  constructor(\n    message: string,\n    ring: Point[],\n    c: bigint,\n    responses: bigint[],\n    curve: Curve,\n    config?: SignatureConfig,\n  )\n```\n\n### RingSignature.verify\n\nThis method verifies if a ring signature is valid.\n\n#### 1. Verify the ring signature\n\n- **Function:** `RingSignature.verify.ts`\n- **Location:** `src/ringSignature.ts`\n- **Description:** Verify a RingSignature.\n\n```typescript\n  verify(): boolean\n```\n\n## Sponsors\n\nWe would like to thank the XRPL Foundation [https://xrpl.org/](https://xrpl.org/) for their support and funding, which have allowed this audited library to be developed for the benefit of many.\n","readmeFilename":"README.md","gitHead":"8dfe01512e35a032d7eaf44c5308539a9b006d81","bugs":{"url":"https://github.com/Cypher-Laboratory/PrivateAirdropClaim/issues"},"homepage":"https://github.com/Cypher-Laboratory/PrivateAirdropClaim#readme","_nodeVersion":"21.7.3","_npmVersion":"10.5.0","dist":{"integrity":"sha512-HUar+zOYMgOwgTbe9GKKXvmnkslMVVdVHYMpGvQckGE6zwWMY6DQSDNte6ujeOEXB7Nr1p2NzroQeSJGvfhW2w==","shasum":"c9fb96cc47aa41236a72881d14466e7c807c7908","tarball":"https://registry.npmjs.org/@cypher-laboratory/alicesring-lsag/-/alicesring-lsag-0.0.4.tgz","fileCount":98,"unpackedSize":295632,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHucSCjW28BtFey/uqiptuwRTAaNUa1Ac2Q3tL5iQ/HdAiACxMNLXfgt7EyuELMJF3+P4Bjea/R0oT4aOQbXL2Zubg=="}]},"_npmUser":{"name":"elli610","email":"niktoua256@gmail.com"},"directories":{},"maintainers":[{"name":"lejamon","email":"lejamon.c@protonmail.com"},{"name":"elli610","email":"niktoua256@gmail.com"},{"name":"cypherlaboratory","email":"cypherlabsas@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alicesring-lsag_0.0.4_1713776840608_0.179449413880868"},"_hasShrinkwrap":false},"0.0.5":{"name":"@cypher-laboratory/alicesring-lsag","version":"0.0.5","description":"A TypeScript implementation of LSAG ring signatures.","main":"dist/src/index.js","module":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/Cypher-Laboratory/Alice-s-Ring-SAG-TS.git"},"scripts":{"build":"npm run fmt && rm -r ./dist && tsc","test":"jest","lint":"eslint .","lint:fix":"eslint . --fix","prettier":"prettier --check .","prettier:fix":"prettier --write .","fmt:check":"npm run prettier && npm run lint","fmt":"npm run prettier:fix && npm run fmt:check"},"author":{"name":"Elli610 && LeJamon && maximedgr"},"license":"MIT","dependencies":{"@noble/hashes":"^1.3.2","crypto-browserify":"^3.12.0","ts-node":"^10.9.1"},"devDependencies":{"@types/jest":"^29.5.7","@types/node":"^20.8.7","@typescript-eslint/eslint-plugin":"^5.61.0","@typescript-eslint/parser":"^5.61.0","eslint":"^8.44.0","jest":"^29.7.0","prettier":"^3.0.0","ts-jest":"^29.1.1"},"_id":"@cypher-laboratory/alicesring-lsag@0.0.5","gitHead":"338ad20bbf973f438deefd7e6dff4b3b8ca87148","bugs":{"url":"https://github.com/Cypher-Laboratory/Alice-s-Ring-SAG-TS/issues"},"homepage":"https://github.com/Cypher-Laboratory/Alice-s-Ring-SAG-TS#readme","_nodeVersion":"21.7.3","_npmVersion":"10.5.0","dist":{"integrity":"sha512-pJomB7lNO0ux6wlpcaZksZ9rVp+1QV00dbB2P+YS6zRm3RzT7CAeXJUulxSXPv8iRKoICU/Q0lFidORfA8rWIg==","shasum":"e1908e7c721ec98350b7871d5a52d73be0dcae3a","tarball":"https://registry.npmjs.org/@cypher-laboratory/alicesring-lsag/-/alicesring-lsag-0.0.5.tgz","fileCount":122,"unpackedSize":373632,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBIusruMuV1DnqkNryCC1k7M/GHICfsZ+YyUY+mwl/QBAiAlh1Y8ohouUP8/Cj0IGF9JITbGBRSlOTZOmRjGkXK9sw=="}]},"_npmUser":{"name":"elli610","email":"niktoua256@gmail.com"},"directories":{},"maintainers":[{"name":"lejamon","email":"lejamon.c@protonmail.com"},{"name":"elli610","email":"niktoua256@gmail.com"},{"name":"cypherlaboratory","email":"cypherlabsas@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alicesring-lsag_0.0.5_1714424579435_0.0843214735722786"},"_hasShrinkwrap":false},"0.1.0":{"name":"@cypher-laboratory/alicesring-lsag","version":"0.1.0","description":"A TypeScript implementation of LSAG ring signatures.","main":"dist/src/index.js","module":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/Cypher-Laboratory/Alice-s-Ring-SAG-TS.git"},"scripts":{"build":"npm run fmt && rm -r ./dist && tsc","test":"jest","lint":"eslint .","lint:fix":"eslint . --fix","prettier":"prettier --check .","prettier:fix":"prettier --write .","fmt:check":"npm run prettier && npm run lint","fmt":"npm run prettier:fix && npm run fmt:check"},"author":{"name":"Elli610 && LeJamon && maximedgr"},"license":"MIT","dependencies":{"@noble/hashes":"^1.3.2","crypto-browserify":"^3.12.0","ts-node":"^10.9.1"},"devDependencies":{"@types/jest":"^29.5.7","@types/node":"^20.8.7","@typescript-eslint/eslint-plugin":"^5.61.0","@typescript-eslint/parser":"^5.61.0","eslint":"^8.44.0","jest":"^29.7.0","prettier":"^3.0.0","ts-jest":"^29.1.1"},"_id":"@cypher-laboratory/alicesring-lsag@0.1.0","gitHead":"83528a494252b316d9fd8a786d85366495d13c2f","bugs":{"url":"https://github.com/Cypher-Laboratory/Alice-s-Ring-SAG-TS/issues"},"homepage":"https://github.com/Cypher-Laboratory/Alice-s-Ring-SAG-TS#readme","_nodeVersion":"21.7.3","_npmVersion":"10.5.0","dist":{"integrity":"sha512-C/YdS1K3qBdgckyOV0uqoEsrU2toaciK6m67OHytJp3SC8NXfA4R5M4ufZBAuM3gVWFoYhm6K5aABAXMj12Sxg==","shasum":"6bdab13085e60f36ae97fd39c03034af949b4b8e","tarball":"https://registry.npmjs.org/@cypher-laboratory/alicesring-lsag/-/alicesring-lsag-0.1.0.tgz","fileCount":118,"unpackedSize":416466,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKpxEqvnr61bnqSYrvMLSnwsC13a8l8cQ20P04RM0IdAIhAOnWsWpP2kk51o9a//Yo04SHbcquyP2q4F5nG1a0GPf2"}]},"_npmUser":{"name":"elli610","email":"niktoua256@gmail.com"},"directories":{},"maintainers":[{"name":"lejamon","email":"lejamon.c@protonmail.com"},{"name":"elli610","email":"niktoua256@gmail.com"},{"name":"cypherlaboratory","email":"cypherlabsas@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alicesring-lsag_0.1.0_1714987486009_0.28465198501005307"},"_hasShrinkwrap":false},"0.1.1":{"name":"@cypher-laboratory/alicesring-lsag","version":"0.1.1","description":"A TypeScript implementation of LSAG ring signatures, adapted for metamask snap environnement","main":"dist/src/index.js","module":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/Cypher-Laboratory/Alice-s-Ring-SAG-TS.git"},"scripts":{"build":"npm run fmt && rm -r ./dist && tsc","test":"jest","lint":"eslint .","lint:fix":"eslint . --fix","prettier":"prettier --check .","prettier:fix":"prettier --write .","fmt:check":"npm run prettier && npm run lint","fmt":"npm run prettier:fix && npm run fmt:check"},"author":{"name":"Elli610 && LeJamon && maximedgr"},"license":"MIT","dependencies":{"@noble/hashes":"^1.3.2","crypto-browserify":"^3.12.0","ts-node":"^10.9.1"},"devDependencies":{"@types/jest":"^29.5.7","@types/node":"^20.8.7","@typescript-eslint/eslint-plugin":"^5.61.0","@typescript-eslint/parser":"^5.61.0","eslint":"^8.44.0","jest":"^29.7.0","prettier":"^3.0.0","ts-jest":"^29.1.1"},"_id":"@cypher-laboratory/alicesring-lsag@0.1.1","readme":"# types-Ring-Signature\n\nThis repository contains a TypeScript implementation of the [Ring Signature](https://en.wikipedia.org/wiki/Ring_signature) algorithm using Spontaneous Anonymous Group (SAG).\n\n## About the implementation\n\nThe implementation is based on the [SAG algorithm](https://eprint.iacr.org/2004/027.pdf) and uses the [Elliptic Curve Cryptography](https://en.wikipedia.org/wiki/Elliptic-curve_cryptography) (ECC) to generate the keys and sign the message.\n\nWe used the implementation proposed in [Zero to Monero](https://www.getmonero.org/library/Zero-to-Monero-2-0-0.pdf) (p.36) as a reference.\n\n\n## Usage\n\n```typescript\nimport { RingSignature } from '@cypherlab/types-ring-signature';\n\nconst curve: Curve = new Curve(CurveName.SECP256K1);\nconst ring: Point[] = []; // your ring of public keys\nconst message = 'Hello World!';\n\nconst signerPrivateKey = BigInt('your private key');\n\n// Sign\nconst signature: RingSignature = RingSignature.sign(\n  ring,\n  signerPrivateKey,\n  message,\n  curve,\n);\n\n// Verify\nconsole.log(\n  \"Is signature verified? \", signature.verify()\n);\n\n// Export to jsonString\nconst jsonString = signature.toJsonString();\n\n// Import from jsonString\nconst retrievedFromJson = RingSignature.fromJsonString(jsonString);\n```","readmeFilename":"README.md","gitHead":"338ad20bbf973f438deefd7e6dff4b3b8ca87148","bugs":{"url":"https://github.com/Cypher-Laboratory/Alice-s-Ring-SAG-TS/issues"},"homepage":"https://github.com/Cypher-Laboratory/Alice-s-Ring-SAG-TS#readme","_nodeVersion":"21.7.3","_npmVersion":"10.5.0","dist":{"integrity":"sha512-0Ut2YhhpUWio3jf+ZKZw5LSzUW5j+rlrGlwpBlQowCj6vWoalxZGqRbIOEV9RdzG/UZ+mOAx/6xsgsFQrVdRPg==","shasum":"11fda7794df81a6bee90217445e32a98fed0b7cf","tarball":"https://registry.npmjs.org/@cypher-laboratory/alicesring-lsag/-/alicesring-lsag-0.1.1.tgz","fileCount":90,"unpackedSize":240425,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDw+ApARurYS/8vK+eBsY09A+EFCgopDboLoIrNr+w15QIhALowgttpGZU8fCC47VZRF/KK5w66kGt1iHYg88UWk2ax"}]},"_npmUser":{"name":"elli610","email":"niktoua256@gmail.com"},"directories":{},"maintainers":[{"name":"lejamon","email":"lejamon.c@protonmail.com"},{"name":"elli610","email":"niktoua256@gmail.com"},{"name":"cypherlaboratory","email":"cypherlabsas@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alicesring-lsag_0.1.1_1715939230640_0.5360520949320084"},"_hasShrinkwrap":false},"0.1.2":{"name":"@cypher-laboratory/alicesring-lsag","version":"0.1.2","description":"A TypeScript implementation of LSAG ring signatures.","main":"dist/src/index.js","module":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/Cypher-Laboratory/Alice-s-Ring-SAG-TS.git"},"scripts":{"build":"npm run fmt && rm -r ./dist && tsc","test":"jest","lint":"eslint .","lint:fix":"eslint . --fix","prettier":"prettier --check .","prettier:fix":"prettier --write .","fmt:check":"npm run prettier && npm run lint","fmt":"npm run prettier:fix && npm run fmt:check"},"author":{"name":"Elli610 && LeJamon && maximedgr"},"license":"MIT","dependencies":{"@noble/hashes":"^1.3.2","crypto-browserify":"^3.12.0","ts-node":"^10.9.1"},"devDependencies":{"@types/jest":"^29.5.7","@types/node":"^20.8.7","@typescript-eslint/eslint-plugin":"^5.61.0","@typescript-eslint/parser":"^5.61.0","eslint":"^8.44.0","jest":"^29.7.0","prettier":"^3.0.0","ts-jest":"^29.1.1"},"_id":"@cypher-laboratory/alicesring-lsag@0.1.2","gitHead":"83528a494252b316d9fd8a786d85366495d13c2f","bugs":{"url":"https://github.com/Cypher-Laboratory/Alice-s-Ring-SAG-TS/issues"},"homepage":"https://github.com/Cypher-Laboratory/Alice-s-Ring-SAG-TS#readme","_nodeVersion":"21.7.3","_npmVersion":"10.5.0","dist":{"integrity":"sha512-YbJQ14UdQs34qaF68cK5IYuBDz4MPvJ6nrLf19NvBWD0ljOW6altoN25MEWFVrR/dwKbT5Mr0+ShtFg/vKI5kA==","shasum":"7d79278fbe608a1c5f0b7ada1488ed1c4a62f3ea","tarball":"https://registry.npmjs.org/@cypher-laboratory/alicesring-lsag/-/alicesring-lsag-0.1.2.tgz","fileCount":79,"unpackedSize":258336,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAhC6U74E2ynMU3vpbM+YM8lHgpU+T5RFknyxXWhIVenAiEA/tqkKgC0vs2TebcQmzIYrRrlgPkJUpPk2d/arjVK3Nc="}]},"_npmUser":{"name":"elli610","email":"niktoua256@gmail.com"},"directories":{},"maintainers":[{"name":"lejamon","email":"lejamon.c@protonmail.com"},{"name":"elli610","email":"niktoua256@gmail.com"},{"name":"cypherlaboratory","email":"cypherlabsas@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alicesring-lsag_0.1.2_1716889898311_0.3864545810910598"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-17T08:56:59.655Z","0.0.1":"2024-04-17T08:56:59.950Z","modified":"2024-05-28T09:51:38.669Z","0.0.2":"2024-04-17T09:32:02.276Z","0.0.3":"2024-04-17T09:44:44.422Z","0.0.4":"2024-04-22T09:07:20.775Z","0.0.5":"2024-04-29T21:02:59.587Z","0.1.0":"2024-05-06T09:24:46.184Z","0.1.1":"2024-05-17T09:47:10.784Z","0.1.2":"2024-05-28T09:51:38.448Z"},"maintainers":[{"name":"lejamon","email":"lejamon.c@protonmail.com"},{"name":"elli610","email":"niktoua256@gmail.com"},{"name":"cypherlaboratory","email":"cypherlabsas@gmail.com"}],"description":"A TypeScript implementation of LSAG ring signatures.","homepage":"https://github.com/Cypher-Laboratory/Alice-s-Ring-SAG-TS#readme","repository":{"type":"git","url":"git+https://github.com/Cypher-Laboratory/Alice-s-Ring-SAG-TS.git"},"author":{"name":"Elli610 && LeJamon && maximedgr"},"bugs":{"url":"https://github.com/Cypher-Laboratory/Alice-s-Ring-SAG-TS/issues"},"license":"MIT","readme":"# Alice's-Ring-LSAG-TS\n\nThis repository contains a TypeScript implementation of the [Ring Signature](https://en.wikipedia.org/wiki/Ring_signature) algorithm using Spontaneous Anonymous Group (SAG).\n\n## About the implementation\n\nThe implementation is based on the [SAG algorithm](https://eprint.iacr.org/2004/027.pdf) and uses the [Elliptic Curve Cryptography](https://en.wikipedia.org/wiki/Elliptic-curve_cryptography) (ECC) to generate the keys and sign the message.\n\nWe used the implementation proposed in [Zero to Monero](https://www.getmonero.org/library/Zero-to-Monero-2-0-0.pdf) (p.36) as a reference.\n\n\n## Usage\n\n```typescript\nimport { RingSignature } from '@cypherlab/types-ring-signature';\n\nconst curve: Curve = new Curve(CurveName.SECP256K1);\nconst ring: Point[] = []; // your ring of public keys\nconst message = 'Hello World!';\n\nconst signerPrivateKey = BigInt('your private key');\n\n// Sign\nconst signature: RingSignature = RingSignature.sign(\n  ring,\n  signerPrivateKey,\n  message,\n  curve,\n);\n\n// Verify\nconsole.log(\n  \"Is signature verified? \", signature.verify()\n);\n\n// Export to jsonString\nconst jsonString = signature.toJsonString();\n\n// Import from jsonString\nconst retrievedFromJson = RingSignature.fromJsonString(jsonString);\n```\n","readmeFilename":"README.md"}