🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@ov0/elliptic

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ov0/elliptic

EC cryptography

latest
Source
npmnpm
Version
6.6.1
Version published
Weekly downloads
4
33.33%
Maintainers
1
Weekly downloads
 
Created
Source

Elliptic Build Status Coverage Status Code Climate

Fast elliptic-curve cryptography in a plain javascript implementation.

NOTE: Forked from Elliptic since the original library is not compatible with react-native. Use this fork as a replacement.

Supported curves

Elliptic.js support following curve types:

  • Short Weierstrass
  • Montgomery
  • Edwards
  • Twisted Edwards

Following curve 'presets' are embedded into the library:

  • secp256k1
  • p192
  • p224
  • p256
  • p384
  • p521
  • curve25519
  • ed25519
  • secp192k1 not existed in the original library

NOTE: That curve25519 could not be used for ECDSA, use ed25519 instead.

For react-native users

Please add a crypto library like expo-crypto or react-native-quick-crypto

yarn add expo-crypto

or

yarn add react-native-quick-crypto

Using babel-plugin-module-resolver

yarn add --dev babel-plugin-module-resolver

Then edit your babel.config.js

module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: [
+   [
+     'module-resolver',
+     {
+       alias: {
+         'crypto': 'react-native-quick-crypto',
+         'stream': 'readable-stream',
+         'buffer': '@craftzdog/react-native-buffer',
+       },
+     },
+   ],
    ...
  ],
};

Implementation details

ECDSA is using deterministic k value generation as per RFC6979. Most of the curve operations are performed on non-affine coordinates (either projective or extended), various windowing techniques are used for different cases.

All operations are performed in reduction context using bn.js, hashing is provided by hash.js

  • eccrypto: isomorphic implementation of ECDSA, ECDH and ECIES for both browserify and node (uses elliptic for browser and secp256k1-node for node)

LICENSE

This software is licensed under the MIT License.

Copyright Fedor Indutny, 2014.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Keywords

EC

FAQs

Package last updated on 26 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts