
Product
Socket Now Protects the Firefox Extension Ecosystem
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.
@celo/poprf
Advanced tools
This repository implements a threshold-computable partially-oblivious pseudo-random function (POPRF) with evaluations that are verifiable by the client.
This library provides WASM bindings for signing under the ffi/wasm.rs module. These can be built
via the wasm-pack tool. Depending on the platform you are
targeting, you'll need to use a different build flag.
Note: You can also replace celo with your own NPM username to test publish.
# Builds the WASM and wraps it as NPM package @celo/poprf
$ wasm-pack build --target nodejs --scope celo -- --features=wasm
The bundled WASM package will be under the pkg/ directory. You can then either pack and publish it
with wasm-pack's pack and publish commands, or manually import it in your application.
$ wasm-pack publish --access public
Here is an example of using the library. In practice there will be a client and a server, with the assumption that the client holds the message and the server holds the private key. In this snippet, both client and server are represented.
import * as poprf from '@celo/poprf'
import 'crypto'
const message = Buffer.from("message")
const tag = Buffer.from("tag")
// Generate a local keypair for demonstration purposes.
const keypair = poprf.keygen(crypto.randomBytes(32))
// Client: Blind the message to send to the server.
const { blindedMessage, blindingFactor } = poprf.blindMsg(message, crypto.randomBytes(32))
// Server: Evaluate the POPRF over the blinded message and tag.
const response = poprf.blindEval(keypair.privateKey, tag, blindedMessage)
// Client: Unblind and verify the evaluation returned from the server.
const result = poprf.unblindResp(keypair.publicKey, blindingFactor, tag, response)
FAQs
A threshold-computable partially-oblivous psuedo-random function
The npm package @celo/poprf receives a total of 38 weekly downloads. As such, @celo/poprf popularity was classified as not popular.
We found that @celo/poprf demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 20 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.

Product
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.

Research
/Security News
Three compromised Rust crates pulled in a malicious dependency that downloaded and executed cross-platform malware during Cargo builds.

Research
/Security News
Socket uncovered 77 linked Firefox extensions, including 40 that steal wallet secrets or credentials and 37 deceptive sports-score shells.