Skip to content

Commit 202c344

Browse files
authored
Update documentation links (#19)
1 parent 406448a commit 202c344

File tree

7 files changed

+37
-32
lines changed

7 files changed

+37
-32
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Applications of Swift Homomorphic Encryption include:
88
## Overview
99
Swift Homomorphic Encryption is a collection of libraries and executables.
1010
For more information, refer to documentation for the libraries:
11-
* [HomomorphicEncryption](Sources/HomomorphicEncryption/HomomorphicEncryption.docc/HomomorphicEncryption.md)
12-
* [PrivateInformationRetrieval](Sources/PrivateInformationRetrieval/PrivateInformationRetrieval.docc/PrivateInformationRetrieval.md)
13-
* [HomomorphicEncryptionProtobuf](Sources/HomomorphicEncryptionProtobuf/HomomorphicEncryptionProtobuf.docc/HomomorphicEncryptionProtobuf.md)
14-
* [PrivateInformationRetrievalProtobuf](Sources/PrivateInformationRetrievalProtobuf/PrivateInformationRetrievalProtobuf.docc/PrivateInformationRetrievalProtobuf.md)
11+
* [HomomorphicEncryption](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/homomorphicencryption)
12+
* [PrivateInformationRetrieval](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/privateinformationretrieval)
13+
* [HomomorphicEncryptionProtobuf](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/homomorphicencryptionprotobuf)
14+
* [PrivateInformationRetrievalProtobuf](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/privateinformationretrievalprotobuf)
1515

1616
and executables:
17-
* [PIRGenerateDatabase](Sources/PIRGenerateDatabase/PIRGenerateDatabase.docc/PIRGenerateDatabase.md)
18-
* [PIRProcessDatabase](Sources/PIRProcessDatabase/PIRProcessDatabase.docc/PIRProcessDatabase.md)
19-
* [PIRShardDatabase](Sources/PIRShardDatabase/PIRShardDatabase.docc/PIRShardDatabase.md)
17+
* [PIRGenerateDatabase](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/pirgeneratedatabase)
18+
* [PIRProcessDatabase](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/pirprocessdatabase)
19+
* [PIRShardDatabase](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/pirsharddatabase)
2020

2121
## Background
2222
### Homomorphic Encryption (HE)
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# ``HomomorphicEncryptionProtobuf``
22

3-
Protocol buffer support for Homomorphic Encryption (HE)
3+
Protocol buffer support for [HomomorphicEncryption](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/homomorphicencryption)
44

55
## Overview
6-
`HomomorphicEncryptionProtobuf` contains supports for using `HomomorphicEncryption` (HE) with [protocol buffers](https://protobuf.dev/), commonly referred to as `protobuf`.
6+
`HomomorphicEncryptionProtobuf` contains supports for using [HomomorphicEncryption](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/homomorphicencryption) with [protocol buffers](https://protobuf.dev/), commonly referred to as `protobuf`.
77
This module contains:
88
* the generated Swift code to use the protobuf types.
9-
* conversion between protobuf types and `HomomorphicEncryption` runtime types.
9+
* conversion between protobuf types and [HomomorphicEncryption](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/homomorphicencryption) runtime types.
1010

1111
The protobuf schemas are defined at [https://github.com/apple/swift-homomorphic-encryption-protobuf](https://github.com/apple/swift-homomorphic-encryption-protobuf).

Sources/PIRGenerateDatabase/PIRGenerateDatabase.docc/PIRGenerateDatabase.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Keyword PIR database generation
44

55
## Overview
66

7-
`PIRGenerateDatabase` is a executable which generates a sample database for testing.
7+
`PIRGenerateDatabase` is an executable which generates a sample database for testing.
88
The resulting database can be processed with the `PIRProcessDatabase` executable or sharded with the `PIRShardDatabase` executable.
99

1010
### Requirements
@@ -29,7 +29,7 @@ PIRGenerateDatabase \
2929

3030
This will generate a database of 100 rows, with keywords 0 to 100, and each value repeating the keyword for 10 to 20 bytes.
3131

32-
The database is a serialized `KeywordDatabase` message.
32+
The database is a serialized [Apple_SwiftHomomorphicEncryption_Pir_V1_KeywordDatabase](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/privateinformationretrievalprotobuf/apple_swifthomomorphicencryption_pir_v1_keyworddatabase).
3333
For readability, the `.txtpb` extension ensures the output database will be saved in protocol buffer text format.
3434

3535
> Note: For a more compact format, use the `.binpb` extension to save the database in protocol buffer binary format.

Sources/PIRProcessDatabase/PIRProcessDatabase.docc/PIRProcessDatabase.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@ Run `PIRProcessDatabase --help` to get a sample JSON configuration.
2626
### Required Configuration Parameters
2727

2828
There are four required parameters:
29-
1. `rlweParameters` is one of the preset RLWE parameters listed in
30-
`Sources/HomomorphicEncryption/EncryptionParameters.swift`, e.g.,
31-
`n_4096_logq_27_28_28_logt_5`.
32-
2. `inputDatabase` is the path to the unprocessed input database. It must be a
33-
serialized ``PrivateInformationRetrieval/KeywordDatabase``.
29+
1. `rlweParameters` is one of the [PredefinedRlweParameters](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/homomorphicencryption/predefinedrlweparameters),
30+
e.g., `n_4096_logq_27_28_28_logt_5`.
31+
1. `inputDatabase` is the path to the unprocessed input database. It must be a
32+
serialized [Apple_SwiftHomomorphicEncryption_Pir_V1_KeywordDatabase](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/privateinformationretrievalprotobuf/apple_swifthomomorphicencryption_pir_v1_keyworddatabase).
3433

3534
> Note: The `PIRGenerateDatabase` binary can be used to generate a sample database.
3635
@@ -53,8 +52,7 @@ A minimal configuration sample is
5352
}
5453
```
5554
The only required parameter variable which affects performance is
56-
`rlweParameters`. These parameters are picked from a set of encryption parameters
57-
in [Sources/HomomorphicEncryption/EncryptionParameters.swift](github.com/apple/swift-homomorphic-encryption/Sources/Sources/HomomorphicEncryption/EncryptionParameters.swift).
55+
`rlweParameters`. These parameters are picked from a set of [PredefinedRlweParameters](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/homomorphicencryption/predefinedrlweparameters).
5856
RLWE parameters are defined by ring dimension `n`, a ciphertext modulus bit
5957
length `log q`, and plaintext modulus bit length, `log t`.
6058

Sources/PIRShardDatabase/PIRShardDatabase.docc/PIRShardDatabase.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,24 @@ Keyword PIR database sharding
44

55
## Overview
66

7-
`PIRShardDatabase` is a executable which divides a database into disjoint shards.
8-
Each resulting shard is suitable for processing with the `PIRProcessDatabase` executable.
7+
[PIRShardDatabase](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/pirsharddatabase) is an executable which divides a database into disjoint shards.
8+
Each resulting shard is suitable for processing with the [PIRProcessDatabase](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/pirprocessdatabase) executable.
99

1010
`PIRShardDatabase` supports two sharding settings:
1111
* `shardCount` randomly shards the database using the specified of shards.
1212
* `entryCountPerShard` shards the database using enough shards such that the average shard contains the specified number of entries.
1313

1414
### Requirements
15-
Build the `PIRProcessDatabase` executable by running:
15+
Build the [PIRProcessDatabase](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/pirprocessdatabase) executable by running:
1616
```sh
1717
swift build -c release --target PIRProcessDatabase
1818
```
1919
The binary will be generated in `.build/release/PIRProcessDatabase`.
2020

21-
22-
For the example below, you'll also need to install the `PIRGenerateDatabase` executable in a similar manner as `PIRShardDatabase`.
21+
For the example below, you'll also need to install the
22+
[PIRGenerateDatabase](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/pirgeneratedatabse)
23+
executable in a similar manner as
24+
[PIRShardDatabase](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/pirsharddatabase).
2325

2426
### Example
2527

Sources/PrivateInformationRetrieval/PrivateInformationRetrieval.docc/ParameterTuning.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Notably, Keyword PIR's server runtime is linear in the shard size,
1010
independent of the keyword size, and dependent on the value size.
1111
Large values, such as images, should be compressed when possible.
1212
Parameters are read in by a JSON file as described in-detail in
13-
`PIRProcessDatabase.md`.
13+
[PIRProcessDatabase](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/pirprocessdatabase) documentation.
1414

1515
```sh
1616
PIRProcessDatabase ~/config.json
@@ -35,7 +35,7 @@ PIRs automatically. For thin databases, smaller RLWE plaintexts in
3535
fits many buckets. Large plaintexts are more efficient for
3636
wide databases.
3737

38-
Otherwise, the observed `noiseBudget` is an important parameter to track. If it is low,
38+
Otherwise, the observed [noise budget](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/homomorphicencryption/hescheme/noisebudget(of:using:variabletime:)-143f3) is an important parameter to track. If it is low,
3939
then it is best to increase the ciphertext-to-plaintext modulus ratio.
4040
This can be done by either decreasing the plaintext modulus with the same ring dimension
4141
or increasing the ring dimension and ciphertext modulus while keeping the
@@ -48,8 +48,7 @@ Here, thin databases benefit from using one hash function, `hashFunctionCount` =
4848
instead of two when constructing the cuckoo table. This is because many more entries
4949
will fit in one ciphertext and only one ciphertext is sent back to the client.
5050
Response sizes are smaller as a result. Settings with
51-
one hash function can also have a smaller `targetLoadFactor`, e.g., something
52-
like 0.75 instead of the 0.9.
51+
one hash function can also have a smaller `targetLoadFactor`, e.g., 0.75 instead of 0.9.
5352

5453
The parameter `bucketCount` should mostly be used in the `allowExpansion` form.
5554
Otherwise, `bucketCount` can be set manually with `fixedSize` and `bucketCount`
@@ -58,6 +57,12 @@ larger computation times.
5857

5958
### Examples
6059

60+
The examples rely on the
61+
[PIRGenerateDatabase](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/pirgeneratedatabase)
62+
and
63+
[PIRProcessDatabase](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/pirprocessdatabase)
64+
executables.
65+
6166
#### Thin Database
6267
```sh
6368
PIRGenerateDatabase \
@@ -67,7 +72,7 @@ PIRGenerateDatabase \
6772
--value-type random
6873
```
6974

70-
Say we run `PIRProcessDatabase` RLWE
75+
Say we run `PIRProcessDatabase` with RLWE
7176
parameters `n_4096_logq_27_28_28_logt_4`, one shard, and see the
7277
following:
7378
* An evaluation key size of 680.8 KB.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# ``PrivateInformationRetrievalProtobuf``
22

3-
Protocol buffer support for Private Information Retrieval (PIR)
3+
Protocol buffer support for [PrivateInformationRetrieval](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/privateinformationretrieval)
44

55
## Overview
6-
`PrivateInformationRetrievalProtobuf` contains supports for using `Private Information Retrieval` (PIR) with [protocol buffers](https://protobuf.dev/), commonly referred to as `protobuf`.
6+
`PrivateInformationRetrievalProtobuf` contains supports for using [PrivateInformationRetrieval](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/privateinformationretrieval) with [protocol buffers](https://protobuf.dev/), commonly referred to as `protobuf`.
77
This module contains:
88
* the generated Swift code to use the protobuf types.
9-
* conversion between protobuf types and `PrivateInformationRetrievalProtobuf` runtime types.
9+
* conversion between protobuf types and [PrivateInformationRetrieval](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/privateinformationretrieval) runtime types.
1010

1111
The protobuf schemas are defined at [https://github.com/apple/swift-homomorphic-encryption-protobuf](https://github.com/apple/swift-homomorphic-encryption-protobuf).

0 commit comments

Comments
 (0)