Skip to content

Commit 0c082c6

Browse files
Merge pull request #31 from lattice-based-cryptography/benchmark_realistic_parameters
add realistic benchmarks
2 parents 70e5f48 + eb9c3d9 commit 0c082c6

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ Decrypts the ciphertext given a secret key, printing the plaintext message.
4343

4444
**Benchmarks**:
4545

46-
| n | q | k | keygen | encrypt | decrypt | keygen_string | encrypt_string | decrypt_string |
47-
|----|-------|---|----------|-----------|-----------|---------------|----------------|----------------|
48-
| 32 | 12289 | 8 | 286.05 µs| 230.64 µs | 24.253 µs | 397.93 µs | 545.25 µs | 64.615 µs |
46+
| n | q | k | keygen | encrypt | decrypt | keygen_string | encrypt_string | decrypt_string |
47+
|-----|-------|---|-----------|-----------|-----------|---------------|----------------|----------------|
48+
| 256 | 12289 | 2 | 146.66 µs | 194.11 µs | 61.535 µs | 230.43 µs | 255.60 µs | 88.291 µs |
49+
| 256 | 12289 | 4 | 562.56 µs | 622.29 µs | 118.37 µs | 819.22 µs | 787.60 µs | 167.38 µs |
50+
| 384 | 12289 | 4 | 1.1774 ms | 1.3473 ms | 260.02 µs | 1.5546 ms | 1.5829 ms | 332.87 µs |
51+
| 512 | 12289 | 4 | 1.1959 ms | 1.3597 ms | 260.77 µs | 1.7172 ms | 1.6976 ms | 356.75 µs |
52+
| 512 | 12289 | 8 | 4.6993 ms | 4.8762 ms | 518.81 µs | 6.4127 ms | 5.7918 ms | 677.05 µs |

src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub struct Parameters {
2323
/// default parameters for module-LWE
2424
impl Default for Parameters {
2525
fn default() -> Self {
26-
let n = 32;
26+
let n = 512;
2727
let q = 12289;
2828
let k = 8;
2929
let omega = omega(q, 2*n);

0 commit comments

Comments
 (0)