# ODIS

ODIS is the privacy-preserving component of Self Connect that ensures identifiers cannot be reverse-engineered from on-chain data.

## What is ODIS

ODIS implements a rate-limited Oblivious Pseudorandom Function (OPRF) that allows users to compute a limited number of hashes without letting the service see the data being hashed.

**Key Properties:**

* **Oblivious:** ODIS operators cannot see the plaintext identifiers
* **Decentralized:** No single party can compute the pepper alone
* **Rate-Limited:** Prevents rainbow table attacks through quota system
* **Deterministic:** Same input always produces same output

## Privacy Guarantees

ODIS provides strong privacy guarantees through its design:

**1. Blinding Process**

When a client queries ODIS:

```
1. Client blinds the identifier locally using a secret one-time key
2. Blinded value is sent to ODIS operators
3. Operators compute the OPRF on the hidden input
4. Operators return the blinded result
5. Client unblinds the result to get the final pepper
```

This process ensures that:

* ODIS operators never see the plaintext identifier
* Even if all operators are compromised, user privacy is maintained
* No targeted censorship is possible

**2. Threshold Cryptography**

ODIS uses a (k, m) threshold signature scheme:

* **m:** Total number of ODIS operators
* **k:** Minimum number of signatures required

**Security Properties:**

* If fewer than k operators are compromised: Attackers cannot compute unauthorized peppers
* If at least k operators are honest: Service remains available for legitimate users

**Example Configuration:**

* 7 operators (m=7)
* 5 required signatures (k=5)
* Security: Need 5 compromised operators to break privacy
* Availability: Can tolerate 2 operators being offline

**3. Distributed Key Generation (DKG)**

Before deployment, ODIS operators participated in a DKG ceremony to generate a shared secret, split across all operators. Each operator holds a key share that can be used to sign responses.

When enough signatures (≥k) are combined, they produce the unique, deterministic pepper for that identifier.

## Quota System and Rate Limiting

ODIS implements a quota system to prevent rainbow table attacks while allowing legitimate usage.

**Quota Factors**

Quota is based on:

1. **Payment:** Pay for quota using cUSD
   * 10 cUSD = 10,000 queries
   * \~0.001 cUSD per query
2. **Account-based Limits:** Rate limits per account to prevent abuse

**How Quota Works**

Issuers check their remaining quota against ODIS and pay for more in cUSD as needed. The code for both is in [ODIS Quota Management](/docs/self-connect/becoming-an-issuer/#odis-quota-management).

**Rate Limiting Strategy**

The quota system makes it prohibitively expensive to:

* Scrape large quantities of identifiers
* Build rainbow tables
* Perform mass surveillance

While still allowing:

* Normal user flows
* Legitimate application usage
* Reasonable issuer operations

## Key Rotation

If an operator's key is leaked or compromised, ODIS can perform key rotation:

1. New DKG ceremony with at least k old keys participating
2. New keys generated for all operators (including new ones)
3. Old keys destroyed after successful rotation
4. Public verification key remains unchanged

This allows:

* Adding new operators
* Removing compromised operators
* Changing threshold values (k, m)
* Maintaining service continuity
