@li0ard/gostcurves

GOST R 34.10 curves and DSA in pure TypeScript

https://github.com/li0ard/gostcurves

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

crypto ecc gost gost3410 streebog
Last synced: 6 months ago · JSON representation ·

Repository

GOST R 34.10 curves and DSA in pure TypeScript

Basic Info
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 4
Topics
crypto ecc gost gost3410 streebog
Created 7 months ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

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

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

- 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

All Time
  • Total Commits: 2
  • Total Committers: 1
  • Avg Commits per committer: 2.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 2
  • Committers: 1
  • Avg Commits per committer: 2.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email 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

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 312 Last month
Rankings
Dependent repos count: 24.1%
Average: 29.5%
Dependent packages count: 34.8%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/docs.yml actions
  • 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
.github/workflows/jsr.yml actions
  • actions/checkout v4 composite
  • oven-sh/setup-bun v2 composite
.github/workflows/npm.yml actions
  • actions/checkout v4 composite
  • oven-sh/setup-bun v2 composite
.github/workflows/test.yml actions
  • actions/checkout v4 composite
  • oven-sh/setup-bun v2 composite
package.json npm
  • @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