> For the complete documentation index, see [llms.txt](https://pingmexyz.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pingmexyz.gitbook.io/docs/technical-resources/security-principles.md).

# Security Principles

* Secrets are never passed in raw form
* All inputs to public functions are hashes of secrets and salts
* On-chain inputs are public but uninformative without secrets
* Salts are created from email + password, and they evolve with each action to protect prior data
* Salts cannot be reused, and their seeds (such as email + password) are never disclosed
* To safeguard against front-runners that monitor mempool for proofs, we use the Commit-Reveal scheme for all proof-validations
  * During the Commit, send the commits contains mapping from the next commitment to hash(proof + salt + globalSalt)
  * Only after the commit is verified off-chain, then Reveal — the protected business function submits the proof, salt and commitment. After successful verification, the business function proceeds, and the commit is removed at the end
  * By the time the proof is revealed, the commit is already on-chain, front-runners cannot front-run both transactions at the same time
* 2FA security and non-repudiation
* N of M password recovery
* Non-reentrant where applicable, safeguarding against race conditions
* Proofs submitted during claims and withdrawals are not visible on the blockchain until the transaction is concluded. This precludes the possibility of front-running
* Furthermore, sanity checks are available, especially before a proof is submitted, to guarantee successful completion of business functions. This will further guarantee prevention of accidental leakage of proofs
* Administrative pause() and unpause() for emergency halting as a backstop. notPaused modifier for all state-changing functions


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://pingmexyz.gitbook.io/docs/technical-resources/security-principles.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
