Transparency
Don't trust us, verify
kr movements and community elections in the nLink Universe are recorded so that you can check the outcome without trusting our server. This page describes the methods, the public endpoints and what the system does and does not guarantee. Everything you need to write your own verifier is here.
Trust Ledger
- The in-game unit kr is held on the server; the browser cannot write a balance. kr is not sold for money, cannot be transferred between members and gives no voting weight. Earning is capped on the server.
- Every kr movement and every election ticket is appended to a hash-chained ledger in which each entry contains the previous entry's hash. Entries hold a keyed hash instead of the member's identity.
- Every night the day's entries are sealed with a SHA-256 Merkle root. Changing a sealed entry afterwards changes the root.
- Members can verify the Merkle path of their own entries in the browser with WebCrypto, at the Transparency Monument in the Universe (My Records).
Roots are recorded outside our servers too
A sealed day is never changed again. Each day's root is anchored outside with a single digest (anchor_digest). It includes the chain's last link of that day (last_hash), so it covers the whole ledger up to that day.
- OpenTimestamps: the digest is sent to OpenTimestamps calendars every night and committed into Bitcoin blocks. The proof can be downloaded as an .ots file from a public endpoint.
- GitHub: the public nLinktr/merkleRoots repository is updated nightly by GitHub Actions, which writes each root once and never changes it. Our server cannot write to it. If a past root ever looks different, the run fails and the discrepancy is recorded under alarms/.
anchor_digest = sha256_hex("nl-root-v1|" + day + "|" + count + "|" + first_seq + "|" + last_seq
+ "|" + last_hash + "|" + merkle_root)
curl -o 2026-12-03.ots https://api.nlink.tr/api/universe/trust/roots/2026-12-03/ots
ots upgrade 2026-12-03.ots && ots verify -d <anchor_digest> 2026-12-03.otsBlind-signed elections
In an election the server knows who voted (tickets) and which votes were cast (ballot box), but cannot link the two. A blind signature makes this possible: the server signs a message without seeing its content.
Methods
- Signature: RFC 9474 RSABSSA-SHA384-PSS-Randomized, 2048-bit RSA, 48-byte PSS salt. Scheme name:
rsabssa-sha384-pss-rand - Each election has its own key pair; the private key is stored encrypted on the server and deleted once the election is sealed.
- Hashes and Merkle: SHA-256, lowercase hex.
- Voting is free; neither kr nor a plan changes voting weight. Each member gets one ticket per election.
Voting flow
- The browser fetches the election key without a session and compares it with the one in the member list. It then checks that the key matches the single commitment entry in the Trust Ledger and that the entry is linked to the daily Merkle root. It stops if the key is not 2048-bit, the two keys differ or the commitment does not match.
- It generates a random nonce (16 bytes), a 32-byte randomizer and a random blinding factor, and blinds the message in the browser.
- It sends the blinded message with the session and receives a ticket. The server checks that the member has not claimed a ticket in this election, writes a participation entry to the Trust Ledger and returns the blind signature. It never sees the choice or the nonce.
- The browser unblinds the signature, verifies it locally and keeps the signed ballot on the device.
- After a random 5–30 second delay it casts the vote without a session cookie. If sending fails, the stored ballot can be sent again; the ticket is not lost.
Byte-level formats
The signed message (UTF-8) is signed with the 32-byte randomizer prepended:
msg = "nl-vote-v2|" + election_id + "|" + choice + "|" + nonce input = randomizer (32 bayt / bytes) || msg sig = RSASSA-PSS-Sign(SHA-384, MGF1-SHA-384, salt 48, input)
The ballot Merkle root is built from votes sorted by nonce (lowercase hex, ascending):
leaf = sha256_hex(election_id + "|" + choice + "|" + nonce + "|" + sig_hex + "|" + randomizer) node = sha256_hex(left_hex + ":" + right_hex) // an odd node is paired with itself root = repeat until one node remains; "" for an empty box
A few older elections opened before this scheme (scheme: rsa-fdh-v1) use 1024-bit RSA-FDH. Their leaves have no randomizer and no new tickets are issued for them.
Trust Ledger anchors
Two system entries are written to the Trust Ledger for each election. They go into the Merkle root sealed every night; changing them afterwards breaks the hash chain.
- election_key: written when the election opens; it commits to the public key. The server therefore cannot hand different members different keys to tell them apart; a second key entry for the same election makes verification fail.
- election_seal: written about a minute after the election closes. It fixes the ballot Merkle root and the number of tickets issued, and then the election's private key is deleted. Adding or removing a vote from a closed box afterwards contradicts the seal.
entry_hash = sha256_hex("nl-trust-v1|" + seq + "|" + at_ms + "|" + day + "|" + kind + "|" + scope
+ "|" + member_hash + "|" + amount + "|" + ref_id + "|" + prev_hash)
election_key: scope = election_id, amount = key_bits (2048)
ref_id = sha256_hex("nl-elkey-v1|" + election_id + "|" + scheme + "|" + n_hex + "|" + e_hex)
// n_hex, e_hex: lowercase, leading zeros stripped
election_seal: scope = election_id, amount = number of votes
ref_id = "nl-elseal-v1:" + ballot_merkle_root + ":" + issued_ticketsThe election key endpoint returns key_anchor; the ballot bundle returns key_anchor and seal_anchor. Each holds the entry itself, how many entries of this kind exist for the election (entries, must be 1) and the path to the day's Merkle root. If the day is not sealed yet, sealed_root is empty; the root is sealed overnight.
Public endpoints
Base URL: https://api.nlink.tr/api. These endpoints need no API key or session. The election id is shown on the election card at the Transparency Monument. The ticket endpoint is members-only and is not listed here.
GET/api/universe/trust/roots
The Trust Ledger's sealed roots for the last 90 days and today's not-yet-sealed summary. Each root carries anchor_digest and whether an .ots proof exists (ots).
curl https://api.nlink.tr/api/universe/trust/roots
GET/api/universe/trust/roots/{day}/ots
That day's OpenTimestamps proof (binary .ots file). Day format YYYY-MM-DD, Turkey time.
curl -o day.ots https://api.nlink.tr/api/universe/trust/roots/{day}/otsGET/api/universe/elections/{id}/key
The election's public key, signature scheme and the key commitment in the Trust Ledger (key_anchor). The browser fetches it without a session cookie and compares it with the key in the member list and with the commitment; if they differ, no vote is sent.
curl https://api.nlink.tr/api/universe/elections/{id}/key{
"id": "6930a1c4a9b3e1d2c3f4a5b6",
"scheme": "rsabssa-sha384-pss-rand",
"key_bits": 2048,
"n_hex": "c4f1…",
"e_hex": "010001",
"key_anchor": {
"entry": {
"seq": 1234, "at_ms": 1764755000000, "day": "2026-12-03",
"kind": "election_key", "scope": "6930a1c4a9b3e1d2c3f4a5b6",
"member_hash": "…", "amount": 2048, "ref_id": "7d0e…",
"prev_hash": "a41b…", "hash": "c9f0…"
},
"entries": 1, "day": "2026-12-03", "index": 17, "day_count": 40,
"merkle_root": "52aa…", "sealed_root": "52aa…",
"proof": [{ "side": "R", "hash": "0b3c…" }]
}
}GET/api/universe/elections/{id}/ballots
The ballot bundle: every anonymous vote, the tally, the number of tickets issued, the ballot Merkle root and the Trust Ledger anchors (key_anchor, plus seal_anchor once closed). No account needed; it contains no member-specific field.
curl https://api.nlink.tr/api/universe/elections/{id}/ballots{
"election": {
"id": "6930a1c4a9b3e1d2c3f4a5b6",
"title": "…", "options": ["Evet", "Hayır"], "status": "open",
"scheme": "rsabssa-sha384-pss-rand", "key_bits": 2048, "n_hex": "c4f1…", "e_hex": "010001",
"issued_tickets": 42, "cast_ballots": 40
},
"issued_tickets": 42,
"tally": [23, 17],
"ballot_merkle_root": "9f2c…",
"ballots": [
{ "choice": 0, "nonce": "03a1…", "sig_hex": "5b7e…", "randomizer": "e19d…" }
],
"key_anchor": { "entry": { "kind": "election_key", "…": "…" }, "proof": […] },
"seal_anchor": { "entry": { "kind": "election_seal", "amount": 40, "ref_id": "nl-elseal-v1:9f2c…:42", "…": "…" }, "proof": […] }
}POST/api/universe/elections/{id}/cast
Casts an unblinded vote. No session needed; the blind signature itself is the authorization. The same nonce is never accepted twice (409).
curl -X POST https://api.nlink.tr/api/universe/elections/{id}/cast \
-H "Content-Type: application/json" \
-d '{"choice": 0, "nonce": "03a1…", "sig_hex": "5b7e…", "randomizer": "e19d…"}'Verifying a tally
A tally is correct only if all of these hold:
- Every vote's signature verifies under the election's public key.
- No nonce appears twice.
- The number of votes does not exceed the number of tickets issued (votes ≤ tickets).
- The tally and Merkle root recomputed from the votes match tally and ballot_merkle_root in the bundle.
- The key commitment holds: the ledger has exactly one election_key entry for this election and its ref_id equals the value computed from the public key.
- If the election has closed, the closing seal holds: the root and ticket count in the election_seal entry equal the recomputed ones and amount equals the number of votes.
- If you voted, your own nonce is in the bundle with the option you chose. Only you know which one it is.
The "Re-Count & Verify All Votes in Browser" button at the Transparency Monument runs the same checks. A Node.js example for an independent verifier (no dependencies):
import crypto from "node:crypto";
const sha256 = (s) => crypto.createHash("sha256").update(s).digest("hex");
const b64u = (hex) => Buffer.from(hex.length % 2 ? "0" + hex : hex, "hex").toString("base64url");
const hexNorm = (h) => h.trim().toLowerCase().replace(/^0+/, "");
// Güven Defteri kaydı: özet, tek kayıt kuralı ve günlük Merkle köküne giden yol
const entryHash = (e) => sha256(`nl-trust-v1|${e.seq}|${e.at_ms}|${e.day}|${e.kind}|${e.scope}|${e.member_hash}|${e.amount}|${e.ref_id}|${e.prev_hash}`);
function anchorOk(a, kind, id, ref, amount) {
if (!a || a.entries !== 1) return false;
const e = a.entry, leaf = entryHash(e);
if (leaf !== e.hash || e.kind !== kind || e.scope !== id || e.ref_id !== ref) return false;
if (amount !== undefined && e.amount !== amount) return false;
if (a.sealed_root && a.sealed_root !== a.merkle_root) return false;
let cur = leaf;
for (const s of a.proof) cur = sha256(s.side === "L" ? `${s.hash}:${cur}` : `${cur}:${s.hash}`);
return cur === a.merkle_root;
}
function merkleRoot(leaves) {
if (!leaves.length) return "";
let level = leaves;
while (level.length > 1) {
const next = [];
for (let i = 0; i < level.length; i += 2) next.push(sha256(`${level[i]}:${level[i + 1] ?? level[i]}`));
level = next;
}
return level[0];
}
export function verifyBundle(bundle) {
const el = bundle.election;
if (el.scheme !== "rsabssa-sha384-pss-rand") throw new Error("bu örnek yalnız v2 seçimleri doğrular");
const key = crypto.createPublicKey({ key: { kty: "RSA", n: b64u(el.n_hex), e: b64u(el.e_hex) }, format: "jwk" });
const tally = new Array(el.options.length).fill(0);
const seen = new Set();
const leaves = [];
let bad = 0;
const ballots = [...bundle.ballots].sort((a, b) => (a.nonce < b.nonce ? -1 : a.nonce > b.nonce ? 1 : 0));
for (const b of ballots) {
if (seen.has(b.nonce)) { bad++; continue; }
seen.add(b.nonce);
const msg = Buffer.concat([Buffer.from(b.randomizer, "hex"), Buffer.from(`nl-vote-v2|${el.id}|${b.choice}|${b.nonce}`)]);
const ok = crypto.verify("sha384", msg, { key, padding: crypto.constants.RSA_PKCS1_PSS_PADDING, saltLength: 48 }, Buffer.from(b.sig_hex, "hex"));
if (!ok || b.choice < 0 || b.choice >= tally.length) { bad++; continue; }
tally[b.choice]++;
leaves.push(sha256(`${el.id}|${b.choice}|${b.nonce}|${b.sig_hex}|${b.randomizer}`));
}
const root = merkleRoot(leaves);
const keyOk = anchorOk(bundle.key_anchor, "election_key", el.id,
sha256(`nl-elkey-v1|${el.id}|${el.scheme}|${hexNorm(el.n_hex)}|${hexNorm(el.e_hex)}`), el.key_bits);
// kapanış mührü seçim bittikten ~1 dk sonra yazılır; yoksa null (bekliyor)
const sealOk = bundle.seal_anchor
? anchorOk(bundle.seal_anchor, "election_seal", el.id, `nl-elseal-v1:${root}:${bundle.issued_tickets}`, seen.size)
: null;
return {
ok: bad === 0 && seen.size <= bundle.issued_tickets && root === bundle.ballot_merkle_root
&& tally.every((n, i) => n === bundle.tally[i]) && keyOk && sealOk !== false,
bad, tally, ballots: seen.size, tickets: bundle.issued_tickets, keyOk, sealOk,
};
}
// const bundle = await (await fetch("https://api.nlink.tr/api/universe/elections/<id>/ballots")).json();
// console.log(verifyBundle(bundle));Threat model and limits
The system guarantees that:
- The server cannot tell from the signatures which vote belongs to whom. The blinding factor is drawn from the full modulus and the randomizer is part of the signed message.
- Verification fails if the number of votes exceeds the number of tickets issued. Every ticket is written to the Trust Ledger as a participation entry.
- The option of a cast vote cannot be changed without detection: it is inside the signed message, so an altered vote fails verification.
- The ballot box of a sealed election cannot be changed. This guarantee rests only on SHA-256, not on RSA, and the private key has been deleted.
There is no full protection against the following; we state them on purpose:
- Network-level linking. The vote is sent without a session and after a random delay, but the server sees the IP address of both the ticket and the vote request. In an election with few voters the two can be matched. For stronger anonymity, cast the vote from a different network (e.g. a VPN).
- Within the day. Daily roots are anchored outside with OpenTimestamps and a public GitHub repository, but that happens overnight. For entries of a day that is not sealed yet, our server is the only source.
- Withholding votes (censorship). The server could leave a received vote out of the box. Only the voter can detect this, by checking whether their own nonce is in the bundle.
- The server's own signature. While the election is open the signing key is on the server. The server could sign votes itself on behalf of members who took a ticket but did not vote; the votes ≤ tickets rule does not catch this. If it removed a vote and put one it signed itself in its place, only the voter could notice, by checking their own nonce. The closing seal and the key deletion limit this to the voting period.
- Multiple accounts. Each account gets one ticket. Additional voter eligibility rules that stop one person from opening several accounts are not in place yet.
- Ballot stored on the device. Until it is sent, your choice stays in your browser's local storage; it is deleted once the vote is recorded.
Post-quantum assessment
A new quantum attack on the structured lattices behind ML-KEM (Kyber), the quantum-resistant key exchange, is being discussed. The attack is not practical today, but we reviewed this system with it in mind. In short:
- We use no lattices or KEMs. This crack does not affect the Trust Ledger or the elections directly.
- Trust Ledger and Merkle roots: SHA-256. Hash functions are the most conservative post-quantum family. Grover's algorithm at most halves the security, leaving a 128-bit margin.
- Private key storage: AES-256-GCM. Symmetric encryption is considered robust against quantum attacks.
- Blind signature: RSA-2048. A large enough quantum computer could break RSA with Shor's algorithm. That has two separate consequences. Ballot secrecy is unaffected: blinding in RSA blind signatures is information-theoretically hiding, so even unlimited computing power cannot link a ticket to a vote, and traffic recorded today cannot be used to make that link tomorrow. Signature forgery, however, would become possible. That is why we added the closing seal: the outcome of a closed election now rests only on SHA-256, not on RSA, and the private key is deleted. Forged votes could only be added to an open election, during the voting period, with a quantum computer that does not exist yet.
- Transport. Connections from browsers are set up at the Cloudflare edge with hybrid X25519 + ML-KEM-768 key exchange (in browsers that support it). Decrypting such a connection requires breaking both families. The connection from Cloudflare to our server still uses classic X25519 only; it will move to the hybrid scheme once the server's OpenSSL is updated.
- Why not switch to a post-quantum blind signature? There is no standardized post-quantum blind signature yet, and most research proposals rest on structured lattices, the very family the discussed attack targets. Switching today would not add security. Thanks to the scheme field, new elections can be opened with a new scheme once a mature standard exists; that is how we moved from v1 to v2.
Found a vulnerability? Please tell us first: [email protected]. For link security, see Security · for the API: Developers