Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@oslojs/crypto

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oslojs/crypto - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

19

dist/ecdsa/curve.js

@@ -105,12 +105,13 @@ import { bigIntBytes } from "@oslojs/binary";

const kBytes = bigIntBytes(k);
// montgomery ladder
const r = [pointAtInfinity(), new JacobianPoint(point.x, point.y, 1n)];
for (let i = 0; i < kBytes.byteLength * 8; i++) {
const byte = kBytes[Math.floor(i / 8)];
const bit = (byte >> (7 - (i % 8))) & 0x01;
const notBit = bit ^ 1;
r[notBit] = this.addJacobian(r[notBit], r[bit]);
r[bit] = this.doubleJacobian(r[bit]);
const bitLength = k.toString(2).length;
let res = pointAtInfinity();
let temp = new JacobianPoint(point.x, point.y, 1n);
for (let i = 0; i < bitLength; i++) {
const byte = kBytes[kBytes.byteLength - 1 - Math.floor(i / 8)];
if ((byte >> i % 8) & 0x01) {
res = this.addJacobian(res, temp);
}
temp = this.doubleJacobian(temp);
}
return this.toAffine(r[0]);
return this.toAffine(res);
}

@@ -117,0 +118,0 @@ isOnCurve(point) {

{
"name": "@oslojs/crypto",
"type": "module",
"version": "0.6.0",
"version": "0.6.1",
"description": "A very basic crypto library",

@@ -86,3 +86,3 @@ "files": [

"@oslojs/asn1": "0.2.2",
"@oslojs/binary": "0.2.3"
"@oslojs/binary": "0.4.0"
},

@@ -89,0 +89,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc