World
ID Nullifier Service

Covered the cryptographic core: secret sharing, distributed proof generation, and the oblivious PRF producing unlinkable nullifiers.
report id
0693
category
Identity & Cryptography
language
Rust
final report
January 12, 2026
lines of code
7790
Content

Download audit report

1

Executive Summary

This document presents the audit performed by Nethermind Security for the World ID OPRF Nullifier code from Nov. 24, 2025 and Dec. 18, 2025. The World Nullifier Service implements a privacy-preserving Verifiable Oblivious Pseudorandom Function for the World ID ecosystem. This audit focuses on validating the correctness of the cryptographic primitives, secret sharing protocols, and distributed proof generation mechanisms that enable relying parties to generate deterministic, unlinkable nullifiers without compromising user privacy or revealing sensitive credential information to any single party.

The audited code comprises 7790 lines of code written in the Rust language. The audit was performed using (a) manual analysis of the codebases and (b) automated analysis tools.

Audit assessment
Audit TypeSecurity Review
Initial ReportDec 19, 2025
Final ReportJanuary 12, 2026
Response from ClientRegular responses during audit engagement
OPRF Service Audit Commit473667cb16
Poseidon2/BabyJubJub Audit Commitddf3709220
Circom Helpers Audit Commit334b6b3c06
Final OPRF Service Audit Commit5dd490517f
Final Poseidon2/BabyJubJub Audit Commit1740f6039c
Final Circom Helpers Audit Commit334b6b3c06
DocumentationOPRF paper
Documentation AssessmentHigh
Test AssessmentHigh
Total findings
9
Fixed
6
Acknowledged
3
Mitigated
0
Unresolved
0

Findings by severity

  • Critical0
  • High0
  • Medium0
  • Low4
  • Informational5
  • Best Practices0

2

Audited Files

#Off-chain codeLoCCommentsRatioBlankTotal
1oprf-core/src/keygen.rs34013339.12%64537
2oprf-core/src/ddlog_equality/shamir.rs2556625.88%37358
3oprf-core/benches/oprf.rs24420.82%25271
4oprf-core/src/ddlog_equality.rs1614829.81%18227
5oprf-core/src/oprf.rs1473020.41%31208
6oprf-core/src/dlog_equality.rs1122724.11%18157
7oprf-core/src/shamir.rs864451.16%10140
8oprf-core/src/lib.rs67116.67%013
9oprf-types/src/crypto.rs1666639.76%33265
10oprf-types/src/api/v1.rs713549.30%10116
11oprf-types/src/chain.rs564885.71%11115
12oprf-types/src/lib.rs502142.00%1384
13oprf-types/src/api.rs15500.00%06
19ark-babyjubjub/src/lib.rs1515100.00%232
20ark-babyjubjub/src/constraints/curves.rs7114.29%311
21ark-babyjubjub/src/constraints/fields.rs6116.67%29
22ark-babyjubjub/src/fields/fr.rs600.00%17
23ark-serde-compat/src/lib.rs52330157.55%63887
24ark-serde-compat/src/babyjubjub.rs2146429.91%27305
25ark-serde-compat/src/impl_macro.rs23800.00%23261
26circom-types/src/groth16/zkey.rs5927713.01%57726
27circom-types/src/groth16/verification_key.rs213136.10%17243
28circom-types/src/groth16/zkey_to_ark.rs20094.50%16225
29circom-types/src/groth16/proof.rs10598.57%9123
30circom-types/src/groth16/public_input.rs6446.25%1078
31circom-types/src/groth16/mod.rs2015.00%122
32circom-types/src/plonk/zkey.rs3058728.52%23415
33circom-types/src/plonk/verification_key.rs204188.82%15237
34circom-types/src/plonk/proof.rs1892111.11%14224
35circom-types/src/plonk/mod.rs1218.33%215
36circom-types/src/bin/convert-zkey-to-ark.rs73810.96%1495
37circom-types/src/r1cs.rs2505020.00%40340
38circom-types/src/traits.rs1892714.29%36252
39circom-types/src/witness.rs1171512.82%17149
40circom-types/src/binfile.rs8367.23%12101
41circom-types/src/lib.rs1601710.62%21198
42groth16/src/lib.rs1952814.36%20243
43groth16/src/reduction.rs241166.64%17274
44groth16-material/src/circom.rs28413748.24%38459
45groth16-material/src/lib.rs12975.00%223
1poseidon2/src/bn254/t16.rs328247.32%10362
2poseidon2/src/bn254/t12.rs276248.70%12312
3poseidon2/src/bn254/t8.rs2192410.96%12255
4poseidon2/src/bn254/t4.rs2112612.32%13250
5poseidon2/src/perm.rs1683621.43%18222
6poseidon2/src/bn254/t3.rs1532415.69%12189
7poseidon2/src/bn254/t2.rs1372216.06%13172
8poseidon2/src/bn254.rs601830.00%987
9poseidon2/benches/poseidon2.rs2200.00%426
10poseidon2/src/lib.rs417425.00%122
Total7790168221.59%87610348

4

System Overview

This system implements an Oblivious PseudoRandom Function-based nullifier construction designed for threshold security and zero-knowledge compatibility. The deterministically derive unlinkable nullifiers from private inputs, while allowing a distributed set of servers to jointly evaluate the OPRF without revealing the underlying secret key or the client input.

The nullifier construction relies on SNARK-friendly cryptography to ensure efficient verification inside zero-knowledge circuits. The poseidon2 crate implements the Poseidon2 permutation over the BN254 scalar field, Poseidon2 is used to hash OPRF transcripts, derive nullifiers, and construct Poseidon-based Merkle trees used to commit to nullifier sets or protocol state.

BabyJubJub serves as the elliptic-curve group for the OPRF. The system uses arkworks-compatible BabyJubJub implementations for group operations and constraint-system support, and EdDSA-BabyJubJub for signing and authentication of protocol artifacts when required.

The oprf-core crate implements the OPRF-based nullifier protocol. To enforce correctness in a distributed setting, oprf-core implements discrete-log equality proofs, including double DLog equality constructions combined with Shamir secret sharing. These mechanisms ensure that each server’s OPRF contribution is consistent with its secret share without revealing the share itself.

As can be seen in the diagram (Fig.2), the user hashes the identity commitment, relaying party ID and the action it wants to perform(e.g. a vote) to obtain a query. this query is blinded over the BabyJubJub elliptic curve with a random scalar β. It then send the blinded query to all servers, to compute an OPRF response (Ci = B· xi), and generates random commitments for the proof. These commitments are then aggregated through Lagrange interpolation reconstructing B· x.

Over round 2, each server computes a challenge hash and generate proof shares, these shares are collected by the client and combines it into a single Chaum-Pedersen proof for which it can verify againt the public key. If everything works out, the client unblinds by multiplying β-1, this is hashed one final time to produce the nullifier.

OPRF core flow
Fig. 2: OPRF core flow

5

Risk Rating Methodology

The risk rating methodology used by Nethermind Security follows the principles established by the OWASP Foundation. The severity of each finding is determined by two factors: Likelihood and Impact.

Likelihood measures how likely the finding is to be uncovered and exploited by an attacker. This factor will be one of the following values:

  1. High: the issue is trivial to exploit and has no specific conditions that need to be met;
  2. Medium: the issue is moderately complex and may have some conditions that need to be met;
  3. Low: the issue is very complex and requires very specific conditions to be met.

When defining the likelihood of a finding, other factors are also considered. These can include but are not limited to motive, opportunity, exploit accessibility, ease of discovery, and ease of exploit.

Impact is a measure of the damage that may be caused if an attacker exploits the finding. This factor will be one of the following values:

  1. High: the issue can cause significant damage, such as loss of funds or the protocol entering an unrecoverable state;
  2. Medium: the issue can cause moderate damage, such as impacts that only affect a small group of users or only a particular part of the protocol;
  3. Low: the issue can cause little to no damage, such as bugs that are easily recoverable or cause unexpected interactions that cause minor inconveniences.

When defining the impact of a finding, other factors are also considered. These can include but are not limited to data and state integrity, loss of availability, financial loss, and reputation damage. After defining the likelihood and impact of an issue, the severity is determined according to the table below.

Impact / LikelihoodLowMediumHigh
HighMediumHighCritical
MediumLowMediumHigh
LowInfo / Best PracticesLowMedium
UndeterminedUndeterminedUndeterminedUndetermined

To address issues that do not fit a High, Medium or Low severity, Nethermind Security also uses three more finding severities: Informational, Best Practices, and Undetermined.

  1. Informational findings do not pose any risk to the application, but they carry some information that the audit team intends to pass to the client formally;
  2. Best Practice findings are used when some piece of code does not conform with smart contract development best practices;
  3. Undetermined findings are used when we cannot predict the impact or likelihood of the issue.

6

Issues

6.1 Lack of uniqueness check of party ID's when computing lagrange coefficients

FileFix commitTypeStatus
oprf-core/src/ddlog_equality/shamir.rsPR #11LowFixed

In combine_commitments(...) it is required to compute the lagrange coefficients for the provided contributing parties. However, there is no check that the contributing parties are unique. This means it is possible to use duplicate party IDs and commitments. Maliciously this can be used to inflate the number of shares and produce an incorrect secret from the secret sharing.

Recommendation

Before computing the lagrange coefficients for the contributing parties, check that:

set(contributing_parties).len() == contributing_parties.len();

This will ensure only unique party IDs are being used in the commitment combination.

6.2 Non-constant time implementation of field arithmetic leading to timing attack vulnerability

The underlying field arithmetic used for the following functions uses branching conditions that branch based on the secret values used. Here we provide a list of key functions we believe are vulnerable to such attacks and why:

  1. shamir.rs/dh_key_derivation(...) performs multiplication of a scalarfield element and an affine element performing group multiplication for affine coordinates using the double-and-add method;
  2. oprf.rs/unblind_response(...) is used to unblind the server response using the prepared blinding factor performed with the double-and-add method;
  3. dlog_equality.rs/partial_commitments(...) performs multiplication over the secret share x_share using the double-and-add method;
  4. shamir.rs/single_lagrange_from_coeff(...) and shamir.rs/evaluate_poly(...) performs field multiplication for a prime field, the ScalarField nor BaseField types do not implement constant-time multiplication;

Recommendation

Implement constant time field arithmetic.

Resolution

Most low-level field arithmetic operations in ark-ff are constant time, with a few exceptions like the subtraction that does a branching on potential overflows. We accept this for now and will re-evaluate in the future if we want to address this further by changing out the underlying field arithmetic completely.

6.3 EdDSA vulnerable to timing attacks

FileFix commitTypeStatus
eddsa-babyjubjub/src/lib.rsPR #11LowFixed

Timing attacks are side channel attacks that enable attackers to infer values of secret keys by noticing changes in the time it takes to perform cryptographic operations. As stated by RFC 8032, such attacks stem from the secret key influencing the set of instructions and memory accesses executed by the code. It was found that the implementation of EdDSA is vulnerable to such attacks after running dudect to measure the signature generation speed against a fixed key and a random key. Specifically, the code run was with 1 million samples:

/// Differential time analysis of signing, fixed key & msg vs. fixed msg & random key
fn eddsa_sign_ct_vary_sk(runner: &mut CtRunner, rng: &mut BenchRng) {
let msg = BaseField::from(0u64);

let mut sk_rng = rand::thread_rng();
let mut keys = Vec::with_capacity(N_SAMPLES);
let mut classes = Vec::with_capacity(N_SAMPLES);

for _ in 0..N_SAMPLES {
if rng.next_u32() & 1 == 0 {
// Left: fixed key
keys.push(EdDSAPrivateKey::from_bytes([0x13; 32]));
classes.push(Class::Left);
} else {
// Right: random key
keys.push(EdDSAPrivateKey::random(&mut sk_rng));
classes.push(Class::Right);
}
}

for (class, sk) in classes.into_iter().zip(keys.into_iter()) {
runner.run_one(class, || {
let sig = sk.sign(msg);
core::hint::black_box(sig);
});
}
}

It was found that this issue stems from the branching condition found in the scalar multiplication in ark-ec/src/twisted_edwards/mod.rs which implements affine multiplication using the double-and-add method:

/// Default implementation of group multiplication for affine coordinates
fn mul_affine(base: &Affine<Self>, scalar: &[u64]) -> Projective<Self> {
let mut res = Projective::<Self>::zero();
for b in ark_ff::BitIteratorBE::without_leading_zeros(scalar) {
res.double_in_place();
if b {
res += base
}
}

res
}

The attack is possible here as an attacker can measure how many times a value is added and how many times it is multiplied. This is because the time to compute a multiplication and the time to complete an addition is different, allowing the attacker to infer information about the key.

Recommendation

We recommend using a constant time implementation of the fields to prevent this attack. However, as far as we understand, there does not exist a constant time implementation of the BabyJubJub curve enabling the usage of constant time curve operations. Arkworks does not implement constant time field operations. Thus, the suggestion is to reimplement a rust crate like Sylow, which uses constant time field operations for BN254, for BJJ.

For Arkworks, a solution could be to implement constant time scalar multiplication to bypass this through the Montgomery ladder method. Various solutions are provided in the paper Elliptic Curves and Side-Channel Analysis.

6.4 their_pk is not validated during share generation

FileFix commitTypeStatus
oprf-core/src/keygen.rsPR #11LowFixed

gen_share public function accepts their_pk as an argument, but it does not validate it being on-curve.

There is no code calling this function in the audit scope (outside of local tests). There is a validation performed if their_pk is obtained specifically via checked versions of deserialize_* methods of CanonicalDeserialize trait.

If obtained by other means though, there's no safeguard against their_pk being off-curve, thus making private key vulnerable to invalid curve attack.

Recommendation

We recommend checking their_pk being on curve and in the correct subgroup inside the gen_share function itself.

6.5 Debug Assertions in Poseidon2 permutation

FileFix commitTypeStatus
eddsa-babyjubjub/poseidon2/src/perm.rs—InfoAcknowledged

The Poseidon2 permutation file contains some debug assertions. These are not part of the release build and will enable users to instantiate Poseidon2 internal matrices with different parameters than the recommended.

/// The matrix multiplication in the internal rounds of the Poseidon2 permutation.
pub fn matmul_internal(&self, input: &mut [F; T]) {
match T {
2 => {
// Matrix [[2, 1], [1, 3]]
debug_assert_eq!(self.mat_internal_diag_m_1[0], F::one());
debug_assert_eq!(self.mat_internal_diag_m_1[1], F::from(2u64));
let sum = input[0] + input[1];
input[0] += &sum;
input[1].double_in_place();
input[1] += sum;
}
3 => {
// Matrix [[2, 1, 1], [1, 2, 1], [1, 1, 3]]
debug_assert_eq!(self.mat_internal_diag_m_1[0], F::one());
debug_assert_eq!(self.mat_internal_diag_m_1[1], F::one());
debug_assert_eq!(self.mat_internal_diag_m_1[2], F::from(2u64));
[...]

Resolution

They acknowledged they are aware of the issue. But it is a minor one, as the library is intended for internal use. Additionally, they would like to explore verification at compile time to avoid incurring additional runtime costs for the assertions. The issue is presented in an informational manner to help keep track of the problem.

6.6 G1/G2 point deserialization accepts point at infinity

FileFix commitTypeStatus
ark-serde-compat/src/lib.rs—InfoAcknowledged

serde deserialization of G1 points via intended #[serde(deserialize_with = "ark_serde_compat::CURVE::deserialize_g1")] boils down to G1Visitor called with const CHECK == true. This CHECK enforces the deserialized point to be on curve and in the subgroup of the correct order, otherwise deserialization will error out. However, it does explicitly allow point at infinity (a.k.a zero point).

Using a point at infinity in certain context may lead to the soundness property of a proof system being broken.

All of the above applies to G2 points as well.

This deserialization routine is used e.g. in VerificationKey of circom_types::plonk and circom_types::groth16, where no additional validation is being done.

Recommendation

Care should be taken when using this deserialization, with additional validation performed accordingly on deserialized entities where this might impact security guarantees.

Resolution

They say that the validation is done on the contract side, so PaI won't reach the deserialization.

6.7 Some assertions can be made constant

FileFix commitTypeStatus
eddsa-babyjubjub/poseidon2/src/perm.rsPR #10InfoFixed

The Poseidon2 permutation file contains some assertions that can be updated to be done at compile time.

/// Creates a new instance of the Poseidon2 permutation with given parameters
pub const fn new(
mat_internal_diag_m_1: [F; T],
round_constants_external: [[F; T]; ROUNDS_F],
round_constants_internal: [F; ROUNDS_P],
) -> Self {
assert!(T == 2 || T == 3 || ((T <= 24) && (T % 4 == 0)));
assert!(D % 2 == 1);
assert!(ROUNDS_F % 2 == 0);

Self {
mat_internal_diag_m_1,
round_constants_external,
round_constants_internal,
}
}

These assertions only involved information known at compile time. They can be defined within a const block (stabilized since Rust 1.79)

pub const fn new(  
mat_internal_diag_m_1: [F; T],
round_constants_external: [[F; T]; ROUNDS_F],
round_constants_internal: [F; ROUNDS_P],
) -> Self {
const {
assert!(T == 2 || T == 3 || ((T <= 24) && (T % 4 == 0)));
assert!(D % 2 == 1);
assert!(ROUNDS_F % 2 == 0);
}
// [...]
}

Alternatively, use static_assertions.

This ensures the checks are done at compile time instead of runtime:

  • Avoiding wrong configurations for Poseidon2;
  • Transforms a potential panic into a compilation error;

6.8 combine_proofs asks for contributing_parties

FileFix commitTypeStatus
oprf-core/src/ddlog_equality/shamir.rsPR #11InfoFixed

One argument to DLogEqualityCommitments::combine_proofs and DLogCommitmentsShamir::combine_proofs methods is contributing_parties listing parties that contributed to proof generation. However, DLogEqualityCommitments (and by extension, its wrapper DLogCommitmentsShamir) already contains contributing_parties vector.

Having contributing_parties argument is unnecessary and introduces risk of misusing it.

Recommendation

We recommend removing contributing_parties argument from combine_proofs and pass in.

6.9 Nonce can be reused during share generation

FileFix commitTypeStatus
oprf-core/src/keygen.rsPR #11InfoFixed

gen_share public function accepts nonce as an argument. While there's no code calling this function in the audit scope (outside of local tests), it opens the opportunity for it to be misused by passing the same nonce multiple times. If allowed, it might make party's secret key vulnerable.

Recommendation

We recommend passing in the secure RNG and generating nonce in the gen_share function itself.

7

Documentation Evaluation

Software documentation refers to the written or visual information that describes the functionality, architecture, design, and implementation of software. It provides a comprehensive overview of the software system and helps users, developers, and stakeholders understand how the software works, how to use it, and how to maintain it. Software documentation can take different forms, such as user manuals, system manuals, technical specifications, requirements documents, design documents, and code comments. Software documentation is critical in software development, enabling effective communication between developers, testers, users, and other stakeholders. It helps to ensure that everyone involved in the development process has a shared understanding of the software system and its functionality. Moreover, software documentation can improve software maintenance by providing a clear and complete understanding of the software system, making it easier for developers to maintain, modify, and update the software over time. Smart contracts can use various types of software documentation. Some of the most common types include:

  • Technical whitepaper: A technical whitepaper is a comprehensive document describing the smart contract’s design and technical details. It includes information about the purpose of the contract, its architecture, its components, and how they interact with each other;
  • User manual: A user manual is a document that provides information about how to use the smart contract. It includes step-by-step instructions on how to perform various tasks and explains the different features and functionalities of the contract;
  • Code documentation: Code documentation is a document that provides details about the code of the smart contract. It includes information about the functions, variables, and classes used in the code, as well as explanations of how they work;
  • API documentation: API documentation is a document that provides information about the API (Application Programming Interface) of the smart contract. It includes details about the methods, parameters, and responses that can be used to interact with the contract;
  • Testing documentation: Testing documentation is a document that provides information about how the smart contract was tested. It includes details about the test cases that were used, the results of the tests, and any issues that were identified during testing;
  • Audit documentation: Audit documentation includes reports, notes, and other materials related to the security audit of the smart contract. This type of documentation is critical in ensuring that the smart contract is secure and free from vulnerabilities.

These types of documentation are essential for smart contract development and maintenance. They help ensure that the contract is properly designed, implemented, and tested, and they provide a reference for developers who need to modify or maintain the contract in the future.

8

Remarks & Test Suite

The World team thoroughly addressed all questions and concerns raised by the Nethermind Security team, providing valuable insights and a comprehensive understanding of the project's technical aspects.

Initially tests were failing due to broken dependencies. This was fixed here

Test suite
81Tests passed0Failed

The complete test output is in the full report.

As auditors, we recommend that any changes or updates made to the audited codebase undergo a re-audit or security review to address potential vulnerabilities or risks introduced by the modifications. By conducting a re-audit or security review of the modified codebase, you can significantly enhance the overall security of your system and reduce the likelihood of exploitation. However, we do not possess the authority or right to impose obligations or restrictions on our clients regarding codebase updates, modifications, or subsequent audits. Accordingly, the decision to seek a re-audit or security review lies solely with you.

This report is based on the scope of materials and documentation provided by you to Nethermind in order that Nethermind could conduct the security review outlined in 1. Executive Summary and 2. Audited Files. The results set out in this report may not be complete nor inclusive of all vulnerabilities. Nethermind has provided the review and this report on an as-is, where-is, and as-available basis. You agree that your access and/or use, including but not limited to any associated services, products, protocols, platforms, content, and materials, will be at your sole risk. Blockchain technology remains under development and is subject to unknown risks and flaws. The review does not extend to the compiler layer, or any other areas beyond the programming language, or other programming aspects that could present security risks. This report does not indicate the endorsement of any particular project or team, nor guarantee its security. No third party should rely on this report in any way, including for the purpose of making any decisions to buy or sell a product, service or any other asset. To the fullest extent permitted by law, Nethermind disclaims any liability in connection with this report, its content, and any related services and products and your use thereof, including, without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement. Nethermind does not warrant, endorse, guarantee, or assume responsibility for any product or service advertised or offered by a third party through the product, any open source or third-party software, code, libraries, materials, or information linked to, called by, referenced by or accessible through the report, its content, and the related services and products, any hyperlinked websites, any websites or mobile applications appearing on any advertising, and Nethermind will not be a party to or in any way be responsible for monitoring any transaction between you and any third-party providers of products or services. As with the purchase or use of a product or service through any medium or in any environment, you should use your best judgment and exercise caution where appropriate. FOR AVOIDANCE OF DOUBT, THE REPORT, ITS CONTENT, ACCESS, AND/OR USAGE THEREOF, INCLUDING ANY ASSOCIATED SERVICES OR MATERIALS, SHALL NOT BE CONSIDERED OR RELIED UPON AS ANY FORM OF FINANCIAL, INVESTMENT, TAX, LEGAL, REGULATORY, OR OTHER ADVICE.