Skip to content

Commit 153ce22

Browse files
committed
chore: Merge branch 'release/v12.0.0'
2 parents a3bae2c + fde7035 commit 153ce22

21 files changed

Lines changed: 818 additions & 1274 deletions

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [12.0.0] - 2023-07-11
6+
7+
### Changed
8+
9+
- use CryptoCore v9.0
10+
- remove generics
11+
- update namings to follow paper updates
12+
- harden zeroization of private data
13+
514
## [11.0.2] - 2023-05-31
615

716
### Documentation

Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cosmian_cover_crypt"
3-
version = "11.0.2"
3+
version = "12.0.0"
44
authors = [
55
"Théophile Brezot <theophile.brezot@cosmian.com>",
66
"Bruno Grieder <bruno.grieder@cosmian.com>",
@@ -22,18 +22,20 @@ name = "benches"
2222
harness = false
2323

2424
[features]
25-
serialization = ["base64"]
25+
serialization = []
26+
test_utils = ["base64"]
2627
full_bench = ["serialization"]
2728
hybridized_bench = []
2829

2930
[dependencies]
3031
base64 = { version = "0.21.0", optional = true }
31-
cosmian_crypto_core = "7.1.0"
32-
# TODO (TBZ): why do we need `std` feature here?
32+
cosmian_crypto_core = { version = "9.0.0", default-features = false, features = ["ser", "sha3", "aes", "curve25519"] }
3333
pqc_kyber = { version = "0.4", features = ["std", "hazmat"] }
3434
serde = { version = "1.0", features = ["derive"] }
3535
serde_json = "1.0"
3636
tiny-keccak = { version = "2.0.2", features = ["shake"] }
37+
zeroize = "1.6.0"
3738

3839
[dev-dependencies]
40+
base64 = { version = "0.21.0" }
3941
criterion = { version = "0.4", features = ["html_reports"], default_features = false }

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Country::Spain)` would be converted into two partitions. The encryption policy
162162
The size of the serialized keys and encapsulation is given by the following formulas:
163163

164164
- master secret key:
165-
$$2 \cdot L_{sk} + \texttt{LEB128sizeof}(|\mathcal{P}|) + \sum\limits_{p~\in~\mathcal{P}} \left( \texttt{LEB128sizeof}(\texttt{sizeof}(p)) + \texttt{sizeof}(p) + 1 + L_{sk} + \delta_{p,~h} \cdot L_{sk}^{pq}\right)$$
165+
$$3 \cdot L_{sk} + \texttt{LEB128sizeof}(|\mathcal{P}|) + \sum\limits_{p~\in~\mathcal{P}} \left( \texttt{LEB128sizeof}(\texttt{sizeof}(p)) + \texttt{sizeof}(p) + 1 + L_{sk} + \delta_{p,~h} \cdot L_{sk}^{pq}\right)$$
166166
- public key:
167167
$$2 \cdot L_{pk} + \texttt{LEB128sizeof}(|\mathcal{P}|) + \sum\limits_{p~\in~\mathcal{P}} \left( \texttt{LEB128sizeof}(\texttt{sizeof}(p)) + \texttt{sizeof}(p) + 1 + L_{pk} + \delta_{p,~h} \cdot L_{pk}^{pq}\right)$$
168168
- user secret key:

benches/BENCHMARKS_classic.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,43 @@
1-
# Benchmarks for CoverCrypt: classic implementation (pre-quantum)
1+
# Benchmarks for Covercrypt: classic implementation (pre-quantum)
22

33
## Table of Contents
44

5+
- [Overview](#overview)
56
- [Benchmark Results](#benchmark-results)
6-
- [Header encryption](#header-encryption)
7-
- [Header encryption + decryption](#header-encryption-and-decryption)
8-
- [Key serialization](#key-serialization)
9-
- [Header serialization](#header-serialization)
7+
- [Header encryption](#header-encryption)
8+
- [Header encryption and decryption](#header-encryption-and-decryption)
9+
- [Key serialization](#key-serialization)
10+
- [Header serialization](#header-serialization)
11+
12+
## Overview
13+
14+
This is a benchmark comparison report.
1015

1116
## Benchmark Results
1217

1318
### Header encryption
1419

1520
| | `1 partition(s), 1 access` | `2 partition(s), 1 access` | `3 partition(s), 1 access` | `4 partition(s), 1 access` | `5 partition(s), 1 access` |
1621
|:-------|:------------------------------------|:------------------------------------|:------------------------------------|:------------------------------------|:------------------------------------ |
17-
| | `293.43 us` (**1.00x**) | `367.53 us` (*1.25x slower*) | `450.77 us` (*1.54x slower*) | `588.11 us` (*2.00x slower*) | `627.62 us` (*2.14x slower*) |
22+
| | `133.32 us` (**1.00x**) | `182.22 us` (*1.37x slower*) | `230.37 us` (*1.73x slower*) | `278.18 us` (*2.09x slower*) | `335.55 us` (*2.52x slower*) |
1823

1924
### Header encryption and decryption
2025

21-
| | `ciphertexts with 1 partition(s), usk with 1 partitions` | `ciphertexts with 2 partition(s), usk with 1 partitions` | `ciphertexts with 3 partition(s), usk with 1 partitions` | `ciphertexts with 4 partition(s), usk with 1 partitions` | `ciphertexts with 5 partition(s), usk with 1 partitions` | `ciphertexts with 1 partition(s), usk with 2 partitions` | `ciphertexts with 2 partition(s), usk with 2 partitions` | `ciphertexts with 3 partition(s), usk with 2 partitions` | `ciphertexts with 4 partition(s), usk with 2 partitions` | `ciphertexts with 5 partition(s), usk with 2 partitions` | `ciphertexts with 1 partition(s), usk with 3 partitions` | `ciphertexts with 2 partition(s), usk with 3 partitions` | `ciphertexts with 3 partition(s), usk with 3 partitions` | `ciphertexts with 4 partition(s), usk with 3 partitions` | `ciphertexts with 5 partition(s), usk with 3 partitions` |
22-
|:-------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------ |
23-
| | `491.23 us` (✅ **1.00x**) | `632.31 us` (*1.29x slower*) | `752.58 us` (*1.53x slower*) | `876.77 us` (*1.78x slower*) | `1.04 ms` (*2.12x slower*) | `487.07 us` (✅ **1.01x faster**) | `662.65 us` (*1.35x slower*) | `852.29 us` (*1.74x slower*) | `1.01 ms` (*2.06x slower*) | `1.16 ms` (*2.37x slower*) | `565.50 us` (*1.15x slower*) | `795.23 us` (*1.62x slower*) | `1.01 ms` (*2.05x slower*) | `1.22 ms` (*2.48x slower*) | `1.43 ms` (*2.91x slower*) |
26+
| | `ciphertexts with 1 partition(s), usk with 1 partitions` | `ciphertexts with 2 partition(s), usk with 1 partitions` | `ciphertexts with 3 partition(s), usk with 1 partitions` | `ciphertexts with 4 partition(s), usk with 1 partitions` | `ciphertexts with 5 partition(s), usk with 1 partitions` | `ciphertexts with 1 partition(s), usk with 2 partitions` | `ciphertexts with 2 partition(s), usk with 2 partitions` | `ciphertexts with 3 partition(s), usk with 2 partitions` | `ciphertexts with 4 partition(s), usk with 2 partitions` | `ciphertexts with 5 partition(s), usk with 2 partitions` | `ciphertexts with 1 partition(s), usk with 3 partitions` | `ciphertexts with 2 partition(s), usk with 3 partitions` | `ciphertexts with 3 partition(s), usk with 3 partitions` | `ciphertexts with 4 partition(s), usk with 3 partitions` | `ciphertexts with 5 partition(s), usk with 3 partitions` | `ciphertexts with 1 partition(s), usk with 4 partitions` | `ciphertexts with 2 partition(s), usk with 4 partitions` | `ciphertexts with 3 partition(s), usk with 4 partitions` | `ciphertexts with 4 partition(s), usk with 4 partitions` | `ciphertexts with 5 partition(s), usk with 4 partitions` | `ciphertexts with 1 partition(s), usk with 5 partitions` | `ciphertexts with 2 partition(s), usk with 5 partitions` | `ciphertexts with 3 partition(s), usk with 5 partitions` | `ciphertexts with 4 partition(s), usk with 5 partitions` | `ciphertexts with 5 partition(s), usk with 5 partitions` |
27+
|:-------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------------------------ |
28+
| | `236.02 us` (**1.00x**) | `293.92 us` (*1.25x slower*) | `356.80 us` (*1.51x slower*) | `419.65 us` (*1.78x slower*) | `480.53 us` (*2.04x slower*) | `229.46 us` (**1.03x faster**) | `310.51 us` (*1.32x slower*) | `406.11 us` (*1.72x slower*) | `484.32 us` (*2.05x slower*) | `565.05 us` (*2.39x slower*) | `227.64 us` (**1.04x faster**) | `339.10 us` (*1.44x slower*) | `450.91 us` (*1.91x slower*) | `543.62 us` (*2.30x slower*) | `645.11 us` (*2.73x slower*) | `312.85 us` (*1.33x slower*) | `446.54 us` (*1.89x slower*) | `572.54 us` (*2.43x slower*) | `689.37 us` (*2.92x slower*) | `810.78 us` (*3.44x slower*) | `231.57 us` (**1.02x faster**) | `375.80 us` (*1.59x slower*) | `527.09 us` (*2.23x slower*) | `661.97 us` (*2.80x slower*) | `814.49 us` (*3.45x slower*) |
2429

2530
### Key serialization
2631

27-
| | `MSK` | `MPK` | `USK 1 partition` |
28-
|:-------|:--------------------------|:----------------------------------|:-------------------------------- |
29-
| | `443.45 ns` (**1.00x**) | `85.07 us` (*191.84x slower*) | `58.34 ns` (**7.60x faster**) |
32+
| | `MSK` | `MPK` | `USK 1 partition` |
33+
|:-------|:--------------------------|:----------------------------------|:--------------------------------- |
34+
| | `801.07 ns` (**1.00x**) | `83.76 us` (*104.55x slower*) | `118.50 ns` (**6.76x faster**) |
3035

3136
### Header serialization
3237

3338
| | `1 partition(s)` | `2 partition(s)` | `3 partition(s)` | `4 partition(s)` | `5 partition(s)` |
3439
|:-------|:--------------------------|:--------------------------------|:--------------------------------|:--------------------------------|:-------------------------------- |
35-
| | `12.15 us` (**1.00x**) | `12.20 us` (**1.00x slower**) | `12.16 us` (**1.00x slower**) | `12.19 us` (**1.00x slower**) | `12.13 us` (**1.00x faster**) |
40+
| | `10.27 us` (**1.00x**) | `10.25 us` (**1.00x faster**) | `10.40 us` (**1.01x slower**) | `10.41 us` (**1.01x slower**) | `10.53 us` (**1.02x slower**) |
3641

3742
---
3843
Made with [criterion-table](https://github.com/nu11ptr/criterion-table)

0 commit comments

Comments
 (0)