@li0ard/gostcurves
GOST R 34.10 curves and DSA in pure TypeScript
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.5%) to scientific vocabulary
Keywords
Repository
GOST R 34.10 curves and DSA in pure TypeScript
Basic Info
- Host: GitHub
- Owner: li0ard
- License: mit
- Language: TypeScript
- Default Branch: main
- Homepage: http://li0ard.is-cool.dev/gostcurves
- Size: 43 KB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 4
Topics
Metadata Files
README.md
@li0ard/gostcurves
GOST R 34.10 curves and DSA in pure TypeScript
docs
[!WARNING] This library is currently in alpha stage: the lib is not very stable yet, and there may be a lot of bugs feel free to try it out, though, any feedback is appreciated!
Installation
```bash
from NPM
npm i @li0ard/gostcurves
from JSR
bunx jsr i @li0ard/gostcurves ```
Supported modes:
- [x] DSA (various curves included)
- [x] VKO key agreement function
- [x] Points conversion from Weierstrass to Twisted Edwards form and vice versa
Features
- Provides simple and modern API
- Most of the APIs are strictly typed
- Fully complies with GOST R 34.10-2012 (RFC 7091) and GOST R 34.10-2001 (RFC 5832) standard
- Supports Bun, Node.js, Deno, Browsers
Examples
Create signature
```ts import { IDGOSTR34102012256PARAMSETA, sign, verify, getPublicKey } from "@li0ard/gostcurves";
let curve = IDGOSTR34102012256PARAMSETA; let privKey = hexToBytes("0ca68a44333dbee1daea1e80dbdd560a43215886a392472b898ed3721e1177e0"); let publicKey = getPublicKey(curve, privKey); let digest = hexToBytes("2dfbc1b372d89a1188c09c52e0eec61fce52032ab1022e8e67ece6672b043ee5");
let signature = sign(curve, privKey, digest); console.log(signature); // -> Uint8Array [...] console.log(verify(curve, publicKey, digest, signature)); // -> true ```
Create shared key with VKO algorithm
```ts import { IDGOSTR34102012512PARAMSETA, getPublicKey, kek_34102012256 } from "@li0ard/gostcurves"
let curve = IDGOSTR34102012512PARAMSETA; let ukm = hexToBytes("27c744853c60801d")
let alicePriv = hexToBytes("67b63ca4ac8d2bb32618d89296c7476dbeb9f9048496f202b1902cf2ce41dbc2f847712d960483458d4b380867f426c7ca0ff5782702dbc44ee8fc72d9ec90c9"); let bobPriv = hexToBytes("dbd09213a592da5bbfd8ed068cccccbbfbeda4feac96b9b4908591440b0714803b9eb763ef932266d4c0181a9b73eacf9013efc65ec07c888515f1b6f759c848");
let alicePub = getPublicKey(curve, alicePriv); let bobPub = getPublicKey(curve, bobPriv);
console.log(kek34102012256(curve, alicePriv, bobPub, ukm)) // -> c9a9a77320e2cc559ed72dce6f47e2192ccea95fa648670582c054c0ef36c221 console.log(kek34102012256(curve, bobPriv, alicePub, ukm)) // -> c9a9a77320e2cc559ed72dce6f47e2192ccea95fa648670582c054c0ef36c221 ```
Owner
- Name: Artem Petrenko
- Login: li0ard
- Kind: user
- Location: Amsterdam
- Website: li0ard.github.io
- Repositories: 4
- Profile: https://github.com/li0ard
- CEO at @nextlng; Web admin at @tosvasq
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: gostcurves
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Nikolai
family-names: Konovalov
email: li0ard@li0ard.rest
affiliation: TheInfinityWay
orcid: 'https://orcid.org/0009-0008-6084-7154'
repository-code: 'https://github.com/li0ard/gostcurves'
abstract: GOST R 34.10 curves and DSA in pure TypeScript
keywords:
- gost
- crypto
- streebog
- curve
- ecc
- gost3410
license: MIT
GitHub Events
Total
- Release event: 3
- Push event: 3
- Create event: 6
Last Year
- Release event: 3
- Push event: 3
- Create event: 6
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Lizard | l****d@p****e | 2 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
Packages
- Total packages: 1
-
Total downloads:
- npm 312 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 5
- Total maintainers: 1
npmjs.org: @li0ard/gostcurves
GOST R 34.10 curves and DSA in pure TypeScript
- Homepage: https://github.com/li0ard/gostcurves#readme
- License: MIT
-
Latest release: 0.1.4
published 6 months ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v4 composite
- actions/configure-pages v3 composite
- actions/deploy-pages v4 composite
- actions/upload-pages-artifact v3 composite
- oven-sh/setup-bun v2 composite
- actions/checkout v4 composite
- oven-sh/setup-bun v2 composite
- actions/checkout v4 composite
- oven-sh/setup-bun v2 composite
- actions/checkout v4 composite
- oven-sh/setup-bun v2 composite
- @types/bun latest development
- typedoc ^0.28.7 development
- @li0ard/gost341194 ^0.1.1
- @li0ard/streebog ^0.2.2
- @noble/curves ^1.9.4
- @noble/hashes ^1.8.0