authenticated_pseudonyms/lib.rs
1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! # Authenticated Pseudonyms
16//!
17//! Often, one wants to communicate authentication without identity. In these circumstances,
18//! one can authenticate a pseudonym scoped by a label for each different context in which one
19//! needs to authenticate unlinkably.
20//!
21//! This project is intended for demonstration purposes only. It is not intended
22//! for use in a production environment. It currently contains unaudited,
23//! experimental cryptography which is not suited for production environments.
24
25#[cfg(any(feature = "private_range", feature = "public_range"))]
26pub(crate) mod math;
27
28pub mod traits;
29
30/// Rate limited range proofs, which can be used for proofs of various types of ages.
31#[cfg(any(feature = "private_range", feature = "public_range"))]
32pub mod age {
33 /// Authenticated pseudonyms where the relying party must be the issuer. This is useful in internal
34 /// authentication systems within a single entity.
35 #[cfg(feature = "private_range")]
36 pub mod private;
37
38 /// Authenticated pseudonyms where the relying party can be anyone. This is useful for interlocking
39 /// systems of authentication, where one party may give permission to access the resources of
40 /// another.
41 #[cfg(feature = "public_range")]
42 pub mod public;
43}
44
45/// Local pseudonyms, linkable by the issuer but not by relying parties alone.
46#[cfg(feature = "pseudonym")]
47pub mod pseudonym;
48
49/// Local pseudonyms, fully unlinkable.
50#[cfg(feature = "unlinkable_pseudonym")]
51pub mod unlinkable_pseudonym;