Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
mcl ; A portable and fast pairing-based cryptography library for Node.js by WebAssembly
see mcl
mulVec(xVec, yVec)
where xVec is an array of G1 or G2 and yVec is an array of Fr, which returns sum of xVec[i] yVec[i]
.The version v0.6.0
breaks backward compatibility of the entry point.
const mcl = require('mcl-wasm')
const mcl = require('mcl-wasm/browser')
<script src="https://herumi.github.io/mcl-wasm/browser/mcl.js"></script>
node test/test.js
// Ethereum 2.0 spec mode
mcl.init(mcl.BLS12_381)
.then(() => {
mcl.setETHserialization(true) // Ethereum serialization
mcl.setMapToMode(mcl.IRTF) // for G2.setHashOf(msg)
...
})
a = new mcl.Fr()
a.setStr('255') // set 255
a.setStr('0xff') // set 0xff = 255
a.setStr('ff', 16) // set ff as hex-string
a.getStr() // '255'
a.getStr(16) // 'ff'
// byte array serialization
b.deserialize(a.serialize()) // b.isEqualTo(a)
// hex string of serialization()
b.deserializeHexStr(a.serializeToHexStr())
// serialization like Ethereum 2.0 only for BLS12-381
mcl.setETHserialization(true)
/*
it is big cost to to verify the order
call once after init() if you want to disable it
cf. sub group problem
*/
mcl.verifyOrderG1(false)
mcl.verifyOrderG2(false)
see test.js
modified new BSD License http://opensource.org/licenses/BSD-3-Clause
2019/Jan/31 add Fp.mapToG1
MITSUNARI Shigeo(herumi@nifty.com)
FAQs
mcl ; A portable and fast pairing-based cryptography library for Node.js by WebAssembly
We found that mcl-wasm demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.