Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply Soter KDF after PBKDF2 for passphrases #640

Merged
merged 8 commits into from
May 20, 2020

Conversation

ilammy
Copy link
Collaborator

@ilammy ilammy commented May 15, 2020

Instead of using PBKDF2 output directly, pass the resulting prekey through an additional round of Soter KDF to associate the encryption key with user-provided associated context as well as the encrypted message length, similar to how symmetric key API does this. Now if different associated context is used for each individual Secure Cell, the encryption key will be different even if PBKDF2 salt somehow ends up the same.

Compatibility considerations

This changes the encryption algorithm, but it's fine to do this before public release. This is the only chance we have to do this update without it becoming a massive backward-compatibility pain.

The change slightly improves security of the encryption and makes the algorithms a bit more compatible and similar in structure. However, this does not change the API or data format in the slightest.

Benchmarks

PBKDF2 is the main time sink in passphrase API. It is expected that 1 additional round of Soter KDF (basically, one HMAC-SHA-256 computation) will not have any noticeable effect on the performance of passphrase encryption and decryption, given that we already do 200,000 rounds for PBKDF2.

Here are measurements before and after this change, on my machine with 4 x Intel Core i5-8250U, using Linux with generic OpenSSL 1.1.1g, running only the benchmarks:

Benchmark Time, before Time, after Change
Encrypt 64 B 116.72 ms ± 1.14 ms 125.26 ms ± 0.66 ms +8.07% slower
Encrypt 4 KB 118.53 ms ± 0.11 ms 129.36 ms ± 2.22 ms +8.58% slower
Encrypt 1 MB 120.44 ms ± 0.65 ms 130.52 ms ± 0.96 ms +7.77% slower
Decrypt 64 B 125.63 ms ± 0.30 ms 128.46 ms ± 0.71 ms +2.63% slower
Decrypt 4 KB 121.67 ms ± 0.42 ms 132.60 ms ± 0.41 ms +9.24% slower
Decrypt 1 MB 122.69 ms ± 0.40 ms 129.56 ms ± 0.82 ms +5.84% slower
Benchmark output

Before:

Benchmarking Secure Cell encryption - Seal, passphrase/64: Warming up for 3.0000 s
Secure Cell encryption - Seal, passphrase/64                                                                          
                        time:   [115.50 ms 116.72 ms 117.28 ms]
                        thrpt:  [545.71   B/s 548.30   B/s 554.13   B/s]

Benchmarking Secure Cell encryption - Seal, passphrase/4 KB: Warming up for 3.0000 s
Secure Cell encryption - Seal, passphrase/4 KB                                                                          
                        time:   [118.42 ms 118.53 ms 118.65 ms]
                        thrpt:  [33.713 KiB/s 33.747 KiB/s 33.779 KiB/s]
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) low mild

Benchmarking Secure Cell encryption - Seal, passphrase/1 MB: Warming up for 3.0000 s
Secure Cell encryption - Seal, passphrase/1 MB                                                                          
                        time:   [119.91 ms 120.44 ms 121.20 ms]
                        thrpt:  [8.2505 MiB/s 8.3032 MiB/s 8.3397 MiB/s]

Benchmarking Secure Cell decryption - Seal, passphrase/64: Warming up for 3.0000 s
Secure Cell decryption - Seal, passphrase/64                                                                          
                        time:   [125.29 ms 125.63 ms 125.90 ms]
                        thrpt:  [508.34   B/s 509.42   B/s 510.80   B/s]

Benchmarking Secure Cell decryption - Seal, passphrase/4 KB: Warming up for 3.0000 s
Secure Cell decryption - Seal, passphrase/4 KB                                                                          
                        time:   [121.23 ms 121.67 ms 122.06 ms]
                        thrpt:  [32.771 KiB/s 32.875 KiB/s 32.996 KiB/s]

Benchmarking Secure Cell decryption - Seal, passphrase/1 MB: Warming up for 3.0000 s
Secure Cell decryption - Seal, passphrase/1 MB                                                                          
                        time:   [122.39 ms 122.69 ms 123.18 ms]
                        thrpt:  [8.1182 MiB/s 8.1508 MiB/s 8.1709 MiB/s]

After:

Benchmarking Secure Cell encryption - Seal, passphrase/64: Warming up for 3.0000 s
Secure Cell encryption - Seal, passphrase/64                                                                          
                        time:   [124.47 ms 125.26 ms 125.79 ms]
                        thrpt:  [508.80   B/s 510.95   B/s 514.20   B/s]
                 change:
                        time:   [+7.0137% +8.0663% +9.1785%] (p = 0.00 < 0.05)
                        thrpt:  [-8.4069% -7.4642% -6.5540%]
                        Performance has regressed.
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high mild

Benchmarking Secure Cell encryption - Seal, passphrase/4 KB: Warming up for 3.0000 s
Secure Cell encryption - Seal, passphrase/4 KB                                                                          
                        time:   [127.19 ms 129.36 ms 131.64 ms]
                        thrpt:  [30.385 KiB/s 30.922 KiB/s 31.449 KiB/s]
                 change:
                        time:   [+7.3726% +8.5848% +9.8243%] (p = 0.00 < 0.05)
                        thrpt:  [-8.9454% -7.9061% -6.8664%]
                        Performance has regressed.

Benchmarking Secure Cell encryption - Seal, passphrase/1 MB: Warming up for 3.0000 s
Secure Cell encryption - Seal, passphrase/1 MB                                                                          
                        time:   [129.51 ms 130.52 ms 131.43 ms]
                        thrpt:  [7.6086 MiB/s 7.6614 MiB/s 7.7213 MiB/s]
                 change:
                        time:   [+7.0080% +7.7663% +8.5063%] (p = 0.00 < 0.05)
                        thrpt:  [-7.8394% -7.2066% -6.5491%]
                        Performance has regressed.

Benchmarking Secure Cell decryption - Seal, passphrase/64: Warming up for 3.0000 s
Secure Cell decryption - Seal, passphrase/64                                                                          
                        time:   [127.88 ms 128.46 ms 129.30 ms]
                        thrpt:  [494.97   B/s 498.21   B/s 500.46   B/s]
                 change:
                        time:   [+1.9737% +2.6323% +3.3709%] (p = 0.00 < 0.05)
                        thrpt:  [-3.2610% -2.5648% -1.9355%]
                        Performance has regressed.
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high mild

Benchmarking Secure Cell decryption - Seal, passphrase/4 KB: Warming up for 3.0000 s
Secure Cell decryption - Seal, passphrase/4 KB                                                                          
                        time:   [132.27 ms 132.60 ms 133.10 ms]
                        thrpt:  [30.053 KiB/s 30.167 KiB/s 30.241 KiB/s]
                 change:
                        time:   [+8.8970% +9.2366% +9.6182%] (p = 0.00 < 0.05)
                        thrpt:  [-8.7743% -8.4556% -8.1701%]
                        Performance has regressed.
Found 3 outliers among 10 measurements (30.00%)
  1 (10.00%) low mild
  2 (20.00%) high mild

Benchmarking Secure Cell decryption - Seal, passphrase/1 MB: Warming up for 3.0000 s
Secure Cell decryption - Seal, passphrase/1 MB                                                                          
                        time:   [128.97 ms 129.56 ms 130.62 ms]
                        thrpt:  [7.6556 MiB/s 7.7184 MiB/s 7.7540 MiB/s]
                 change:
                        time:   [+5.3473% +5.8421% +6.4588%] (p = 0.00 < 0.05)
                        thrpt:  [-6.0670% -5.5196% -5.0759%]
                        Performance has regressed.
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high mild

Well, this is intredesting 🤔 But not very relevant, given the noise brackets.

It doesn't seem like that much. I'd expect some variation, but not a consistent performance drop across all input sizes. I guess I suck at microbenchmarks and by environment is noisy. I'll keep looking into it.

Nevertheless, it's great that we have benchmarks at all.

Checklist

  • Change is covered by automated tests
  • Benchmark results are attached
  • The coding guidelines are followed
  • Public API has proper documentation
  • Changelog is updated (nothing notable happens here)
    Original passphrase encryption implemented in Passphrase-based API of Secure Cell #577, this PR cross-reference is enough.

Export a bunch of functions from sym_enc_message.c which are used by the
symmetric key API to perform ZRTP-style Soter KDF based on Secure Cell
message length and user-provided associated context.

This API is not very convenient due to compatibility reasons,
but it's okay for an internal API to force its users to deal
with themis_auth_sym_kdf_context() and its friends.

Note that secure_cell_seal_passphrase.c already has a function named
themis_auth_sym_derive_encryption_key() which has a similar goal, but
uses passphrase-based derivation algorithm. Rename it with a customary
"passphrase" suffix to avoid ambiguity and naming conflicts.
Since we are going to use passphrase to derive a prekey, we should not
depend on the default encryption algorithm choice. Instead, always
derive full 32-byte prekey from passphrase with PBKDF2. After that
we will use Soter KDF to truncate the key to the length suitable for
the AES flavor in use. soter_alg_key_length() verification will also
be performed at that point to ensure that Secure Cell header is not
corrupted.
Instead of using PBKDF2 output directly, pass the resulting prekey
through an additional round of Soter KDF to associate the encryption key
with user-provided associated context as well as the encrypted message
length, similar to how symmetric key API does this.

This changes the encryption algorith, but it's fine to do this before
public relese. This is the only chance we have to do this update without
it becoming a massive backward-compatibility pain.

The change slightly improves security of the encryption and makes the
algorithms a bit more compatible and similar in structure. However,
this does not change the API or data format in the slightest.
Some of the tests process preencrypted data to make sure we can decrypt
something encrypted earlier, possibly by a differen wrapper. Update the
hardcoded values since the encryption algorithm has changed a bit.

Themis Core tests check that we can handle different key lengths.
Other language test verify mostly handling of the passphrase encoding.
@ilammy ilammy added the core Themis Core written in C, its packages label May 15, 2020
Copy link
Contributor

@vixentael vixentael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's weird to see such huge performance drop after adding one Soter KDF call 🤔 We assume that it has only one round, right?

@ilammy
Copy link
Collaborator Author

ilammy commented May 15, 2020

Alrighty. I realized that I do suck at benchmarks: I've been running them on a laptop with CPU frequency scaling enabled. However...

After having the CPUs run at their full 3.4 GHz glory and collecting 50 samples instead of 10 (urgh, 15 minutes for one benchmark run) — I still see consistent 6-8% drop in performance.

Benchmark output

Before:

Benchmarking Secure Cell encryption - Seal, passphrase/64: Warming up for 3.0000 s
Secure Cell encryption - Seal, passphrase/64                                                                            
                        time:   [114.10 ms 114.58 ms 114.98 ms]
                        thrpt:  [556.61   B/s 558.56   B/s 560.93   B/s]

Benchmarking Secure Cell encryption - Seal, passphrase/4 KB: Warming up for 3.0000 s
Secure Cell encryption - Seal, passphrase/4 KB                                                                            
                        time:   [116.22 ms 116.46 ms 116.70 ms]
                        thrpt:  [34.276 KiB/s 34.347 KiB/s 34.418 KiB/s]

Benchmarking Secure Cell encryption - Seal, passphrase/1 MB: Warming up for 3.0000 s
Secure Cell encryption - Seal, passphrase/1 MB                                                                            
                        time:   [114.47 ms 114.62 ms 114.82 ms]
                        thrpt:  [8.7095 MiB/s 8.7243 MiB/s 8.7358 MiB/s]
Found 7 outliers among 50 measurements (14.00%)
  5 (10.00%) high mild
  2 (4.00%) high severe
Benchmarking Secure Cell decryption - Seal, passphrase/64: Warming up for 3.0000 s
Secure Cell decryption - Seal, passphrase/64                                                                            
                        time:   [114.03 ms 114.17 ms 114.31 ms]
                        thrpt:  [559.87   B/s 560.55   B/s 561.25   B/s]
Found 1 outliers among 50 measurements (2.00%)
  1 (2.00%) high mild

Benchmarking Secure Cell decryption - Seal, passphrase/4 KB: Warming up for 3.0000 s
Secure Cell decryption - Seal, passphrase/4 KB                                                                            
                        time:   [114.89 ms 115.12 ms 115.43 ms]
                        thrpt:  [34.654 KiB/s 34.746 KiB/s 34.816 KiB/s]
Found 1 outliers among 50 measurements (2.00%)
  1 (2.00%) high mild

Benchmarking Secure Cell decryption - Seal, passphrase/1 MB: Warming up for 3.0000 s
Secure Cell decryption - Seal, passphrase/1 MB                                                                            
                        time:   [116.84 ms 117.59 ms 118.41 ms]
                        thrpt:  [8.4450 MiB/s 8.5041 MiB/s 8.5590 MiB/s]
Found 1 outliers among 50 measurements (2.00%)
  1 (2.00%) high mild

After:

Benchmarking Secure Cell encryption - Seal, passphrase/64: Warming up for 3.0000 s
Secure Cell encryption - Seal, passphrase/64                                                                            
                        time:   [119.94 ms 120.38 ms 120.82 ms]
                        thrpt:  [529.72   B/s 531.66   B/s 533.59   B/s]
                 change:
                        time:   [+5.7366% +6.5649% +7.3879%] (p = 0.00 < 0.05)
                        thrpt:  [-6.8796% -6.1605% -5.4253%]
                        Performance has regressed.
Found 5 outliers among 50 measurements (10.00%)
  2 (4.00%) low mild
  1 (2.00%) high mild
  2 (4.00%) high severe

Benchmarking Secure Cell encryption - Seal, passphrase/4 KB: Warming up for 3.0000 s
Secure Cell encryption - Seal, passphrase/4 KB                                                                            
                        time:   [124.16 ms 124.53 ms 124.95 ms]
                        thrpt:  [32.013 KiB/s 32.122 KiB/s 32.218 KiB/s]
                 change:
                        time:   [+7.0678% +7.3965% +7.7285%] (p = 0.00 < 0.05)
                        thrpt:  [-7.1741% -6.8871% -6.6013%]
                        Performance has regressed.

Benchmarking Secure Cell encryption - Seal, passphrase/1 MB: Warming up for 3.0000 s
Secure Cell encryption - Seal, passphrase/1 MB                                                                            
                        time:   [124.96 ms 125.33 ms 125.79 ms]
                        thrpt:  [7.9500 MiB/s 7.9790 MiB/s 8.0028 MiB/s]
                 change:
                        time:   [+8.4013% +8.9421% +9.5508%] (p = 0.00 < 0.05)
                        thrpt:  [-8.7182% -8.2081% -7.7501%]
                        Performance has regressed.
Found 1 outliers among 50 measurements (2.00%)
  1 (2.00%) high mild
Benchmarking Secure Cell decryption - Seal, passphrase/64: Warming up for 3.0000 s
Secure Cell decryption - Seal, passphrase/64                                                                            
                        time:   [122.87 ms 123.25 ms 123.71 ms]
                        thrpt:  [517.33   B/s 519.27   B/s 520.88   B/s]
                 change:
                        time:   [+8.2849% +8.6548% +9.0025%] (p = 0.00 < 0.05)
                        thrpt:  [-8.2590% -7.9654% -7.6510%]
                        Performance has regressed.
Found 13 outliers among 50 measurements (26.00%)
  7 (14.00%) low mild
  5 (10.00%) high mild
  1 (2.00%) high severe

Benchmarking Secure Cell decryption - Seal, passphrase/4 KB: Warming up for 3.0000 s
Secure Cell decryption - Seal, passphrase/4 KB                                                                            
                        time:   [124.28 ms 124.49 ms 124.75 ms]
                        thrpt:  [32.065 KiB/s 32.130 KiB/s 32.186 KiB/s]
                 change:
                        time:   [+7.8544% +8.1609% +8.4637%] (p = 0.00 < 0.05)
                        thrpt:  [-7.8033% -7.5452% -7.2824%]
                        Performance has regressed.

Benchmarking Secure Cell decryption - Seal, passphrase/1 MB: Warming up for 3.0000 s
Secure Cell decryption - Seal, passphrase/1 MB                                                                            
                        time:   [124.74 ms 125.18 ms 125.67 ms]
                        thrpt:  [7.9577 MiB/s 7.9888 MiB/s 8.0164 MiB/s]
                 change:
                        time:   [+7.1820% +7.7639% +8.3215%] (p = 0.00 < 0.05)
                        thrpt:  [-7.6823% -7.2045% -6.7007%]
                        Performance has regressed.

No serious ideas at the moment:

  • Are function calls across the library boundary that expensive?
  • Does it bump into some invisible wall with CPU caches or something?
  • Does soter_kdf() do something silly?
  • Do I do something silly, like building without optimizations?

It would be nice if someone could reproduce the experiment.

How to benchmark
# Prepare repo
git clone https://github.com/cossacklabs/themis.git
cd themis
git remote add ilammy https://github.com/ilammy/themis.git
git fetch ilammy

# Build and install master
git checkout master
make
sudo make install

# Build benchmarks
cd benches/themis
cargo bench --no-run
# Wait for Rust to build stuff...

# Run benchmarks (master)
cargo bench -- --sample-size 10 passphrase
# Wait for benchmarks to complete...

# Build and install this branch
git checkout zrtp-goes-in-every-field
cd ../..
make
sudo make install
cd -

# Run benchmarks again
cargo bench -- --sample-size 10 passphrase
# Wait for benchmarks to complete...

We assume that it has only one round, right?

Yeah, it should. There are basically soter_hmac and soter_wipe calls but that's about it.

I haven't done any profiling yet so I have no idea where it spends time.

@ilammy
Copy link
Collaborator Author

ilammy commented May 15, 2020

Yknow, maybe that's soter_wipe().

Here are top ten functions that we're spending time in when running benchmarks, based on perf output:

Overhead  Command          Shared Object      Symbol
   6,85%  secure_cell_sea  libcrypto.so.1.1   [.] OPENSSL_cleanse
   6,25%  secure_cell_sea  libcrypto.so.1.1   [.] EVP_MD_CTX_copy_ex
   6,06%  secure_cell_sea  libcrypto.so.1.1   [.] SHA256_Final
   5,65%  secure_cell_sea  libcrypto.so.1.1   [.] PKCS5_PBKDF2_HMAC
   3,47%  secure_cell_sea  libcrypto.so.1.1   [.] EVP_MD_CTX_reset
   1,38%  secure_cell_sea  libcrypto.so.1.1   [.] EVP_MD_CTX_clear_flags
   1,30%  secure_cell_sea  libcrypto.so.1.1   [.] SHA256_Update
   1,28%  secure_cell_sea  libcrypto.so.1.1   [.] HMAC_CTX_copy
   1,08%  secure_cell_sea  libcrypto.so.1.1   [.] EVP_DigestFinal_ex
   1,08%  secure_cell_sea  libcrypto.so.1.1   [.] ENGINE_finish
   1,07%  secure_cell_sea  libcrypto.so.1.1   [.] HMAC_Final

OPENSSL_cleanse() is the one used by soter_wipe(). What are others, I don't know yet. But EVP_MD_CTX_copy_ex() looks suspicious.

@vixentael
Copy link
Contributor

It would be nice if someone could reproduce the experiment.

In progress..

@vixentael
Copy link
Contributor

vixentael commented May 15, 2020

Benchmarks on my machine (openssl 1.1.1g, 10 passphrases):

Benchmark Time, before Time, after Change
Encrypt 64 B 92.575 ms 92.510 ms -0.3886%
Encrypt 4 KB 93.777 ms 92.403 ms -1.0970%
Encrypt 1 MB 93.169 ms 92.837 ms -0.1334%
Decrypt 64 B 92.339 ms 92.886 ms +0.6470%
Decrypt 4 KB 92.444 ms 93.848 ms +1.1705%
Decrypt 1 MB 93.392 ms 95.800 ms +4.5314%
Benchmark output

Before

➜  themis git:(master) cargo bench -- --sample-size 10 passphrase

Benchmarking Secure Cell encryption - Seal, passphrase/64: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 5.1s.
Secure Cell encryption - Seal, passphrase/64                                                                          
                        time:   [92.321 ms 92.575 ms 92.952 ms]
                        thrpt:  [688.52   B/s 691.33   B/s 693.23   B/s]
Found 2 outliers among 10 measurements (20.00%)
  2 (20.00%) high mild
Benchmarking Secure Cell encryption - Seal, passphrase/4 KB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 5.2s.
Secure Cell encryption - Seal, passphrase/4 KB                                                                          
                        time:   [93.167 ms 93.777 ms 94.563 ms]
                        thrpt:  [42.300 KiB/s 42.654 KiB/s 42.934 KiB/s]
Benchmarking Secure Cell encryption - Seal, passphrase/1 MB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 5.2s.
Secure Cell encryption - Seal, passphrase/1 MB                                                                          
                        time:   [92.730 ms 93.169 ms 93.891 ms]
                        thrpt:  [10.651 MiB/s 10.733 MiB/s 10.784 MiB/s]
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high mild

Benchmarking Secure Cell decryption - Seal, passphrase/64: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 5.1s.
Secure Cell decryption - Seal, passphrase/64                                                                          
                        time:   [92.035 ms 92.339 ms 92.626 ms]
                        thrpt:  [690.95   B/s 693.10   B/s 695.39   B/s]
Benchmarking Secure Cell decryption - Seal, passphrase/4 KB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 5.1s.
Secure Cell decryption - Seal, passphrase/4 KB                                                                          
                        time:   [92.262 ms 92.444 ms 92.564 ms]
                        thrpt:  [43.213 KiB/s 43.269 KiB/s 43.355 KiB/s]
Benchmarking Secure Cell decryption - Seal, passphrase/1 MB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 5.2s.
Secure Cell decryption - Seal, passphrase/1 MB                                                                          
                        time:   [92.972 ms 93.392 ms 93.852 ms]
                        thrpt:  [10.655 MiB/s 10.708 MiB/s 10.756 MiB/s]
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high mild

After

➜  themis git:(zrtp-goes-in-every-field) cargo bench -- --sample-size 10 passphrase

Benchmarking Secure Cell encryption - Seal, passphrase/64: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 5.1s.
Secure Cell encryption - Seal, passphrase/64                                                                          
                        time:   [92.263 ms 92.510 ms 92.801 ms]
                        thrpt:  [689.64   B/s 691.82   B/s 693.67   B/s]
                 change:
                        time:   [-1.1062% -0.3886% +0.2955%] (p = 0.33 > 0.05)
                        thrpt:  [-0.2946% +0.3901% +1.1186%]
                        No change in performance detected.
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high mild
Benchmarking Secure Cell encryption - Seal, passphrase/4 KB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 5.1s.
Secure Cell encryption - Seal, passphrase/4 KB                                                                          
                        time:   [92.249 ms 92.403 ms 92.644 ms]
                        thrpt:  [43.176 KiB/s 43.289 KiB/s 43.361 KiB/s]
                 change:
                        time:   [-2.1557% -1.0970% +0.0088%] (p = 0.09 > 0.05)
                        thrpt:  [-0.0088% +1.1092% +2.2032%]
                        No change in performance detected.
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high mild
Benchmarking Secure Cell encryption - Seal, passphrase/1 MB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 5.1s.
Secure Cell encryption - Seal, passphrase/1 MB                                                                          
                        time:   [92.638 ms 92.837 ms 93.130 ms]
                        thrpt:  [10.738 MiB/s 10.772 MiB/s 10.795 MiB/s]
                 change:
                        time:   [-0.8029% -0.1334% +0.5553%] (p = 0.72 > 0.05)
                        thrpt:  [-0.5522% +0.1336% +0.8094%]
                        No change in performance detected.
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high mild

Benchmarking Secure Cell decryption - Seal, passphrase/64: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 5.1s.
Secure Cell decryption - Seal, passphrase/64                                                                          
                        time:   [92.455 ms 92.886 ms 93.179 ms]
                        thrpt:  [686.85   B/s 689.02   B/s 692.23   B/s]
                 change:
                        time:   [+0.0893% +0.6470% +1.2343%] (p = 0.05 < 0.05)
                        thrpt:  [-1.2193% -0.6428% -0.0893%]
                        Change within noise threshold.
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high mild
Benchmarking Secure Cell decryption - Seal, passphrase/4 KB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 5.3s.
Secure Cell decryption - Seal, passphrase/4 KB                                                                          
                        time:   [92.957 ms 93.848 ms 94.577 ms]
                        thrpt:  [42.293 KiB/s 42.622 KiB/s 43.031 KiB/s]
                 change:
                        time:   [+0.5580% +1.1705% +1.9286%] (p = 0.00 < 0.05)
                        thrpt:  [-1.8921% -1.1570% -0.5549%]
                        Change within noise threshold.
Benchmarking Secure Cell decryption - Seal, passphrase/1 MB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 5.2s.
Secure Cell decryption - Seal, passphrase/1 MB                                                                          
                        time:   [95.151 ms 95.800 ms 96.627 ms]
                        thrpt:  [10.349 MiB/s 10.438 MiB/s 10.510 MiB/s]
                 change:
                        time:   [+2.7232% +4.5314% +7.3773%] (p = 0.00 < 0.05)
                        thrpt:  [-6.8704% -4.3350% -2.6510%]
                        Performance has regressed.
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high severe

@ilammy
Copy link
Collaborator Author

ilammy commented May 15, 2020

Can confirm on my macOS laptop there's also no statistically significant change in performance either.

Copy link
Collaborator

@Lagovas Lagovas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ilammy
Copy link
Collaborator Author

ilammy commented May 18, 2020

Okay, I've done a couple more attempts at measuring with clean rebuilds. This time I've been getting inconclusive results which are fluctuating around. So I guess it is fine, that first time was a spike. Unless @Lagovas comes out with some surprises, I'd be merging this tomorrow morning.

@Lagovas
Copy link
Collaborator

Lagovas commented May 18, 2020

Ubuntu

$ openssl version
OpenSSL 1.1.1  11 Sep 2018

$ uname -r
4.15.0-42-generic

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.4 LTS
Release:	18.04
Codename:	bionic
Ubuntu 18.04
$ git checkout master

master

$ cargo bench -- --sample-size 10 passphrase
    Updating crates.io index
   Compiling libthemis-sys v0.12.0 (/tmp/themis/src/wrappers/themis/rust/libthemis-sys)
   Compiling themis v0.12.0 (/tmp/themis/src/wrappers/themis/rust)
   Compiling themis-core-bench v0.0.0 (/tmp/themis/benches/themis)
    Finished bench [optimized] target(s) in 18.89s
     Running /tmp/themis/target/release/deps/secure_cell_seal_master_key-52f2493607692f6b
Gnuplot not found, using plotters backend
     Running /tmp/themis/target/release/deps/secure_cell_seal_passphrase-088337c6771ce84d
Gnuplot not found, using plotters backend
Benchmarking Secure Cell encryption - Seal, passphrase/64: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 10.3s.
Secure Cell encryption - Seal, passphrase/64                                                                          
                        time:   [181.16 ms 182.35 ms 183.68 ms]
                        thrpt:  [348.44   B/s 350.97   B/s 353.28   B/s]
                 change:
                        time:   [-1.0384% +0.2126% +1.4095%] (p = 0.77 > 0.05)
                        thrpt:  [-1.3899% -0.2122% +1.0493%]
                        No change in performance detected.
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high mild
Benchmarking Secure Cell encryption - Seal, passphrase/4 KB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 10.1s.
Secure Cell encryption - Seal, passphrase/4 KB                                                                          
                        time:   [181.50 ms 182.62 ms 184.73 ms]
                        thrpt:  [21.653 KiB/s 21.903 KiB/s 22.039 KiB/s]
                 change:
                        time:   [-1.6934% -0.8289% +0.2213%] (p = 0.13 > 0.05)
                        thrpt:  [-0.2208% +0.8359% +1.7226%]
                        No change in performance detected.
Benchmarking Secure Cell encryption - Seal, passphrase/1 MB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 10.0s.
Secure Cell encryption - Seal, passphrase/1 MB                                                                          
                        time:   [181.62 ms 182.50 ms 183.95 ms]
                        thrpt:  [5.4362 MiB/s 5.4796 MiB/s 5.5060 MiB/s]
                 change:
                        time:   [-0.8876% +0.3113% +1.9624%] (p = 0.76 > 0.05)
                        thrpt:  [-1.9246% -0.3103% +0.8955%]
                        No change in performance detected.
Found 2 outliers among 10 measurements (20.00%)
  1 (10.00%) high mild
  1 (10.00%) high severe

Benchmarking Secure Cell decryption - Seal, passphrase/64: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 10.1s.
Secure Cell decryption - Seal, passphrase/64                                                                          
                        time:   [181.18 ms 181.85 ms 182.63 ms]
                        thrpt:  [350.44   B/s 351.94   B/s 353.25   B/s]
                 change:
                        time:   [-0.1221% +0.5383% +1.0744%] (p = 0.12 > 0.05)
                        thrpt:  [-1.0630% -0.5355% +0.1222%]
                        No change in performance detected.
Benchmarking Secure Cell decryption - Seal, passphrase/4 KB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 10.3s.
Secure Cell decryption - Seal, passphrase/4 KB                                                                          
                        time:   [183.14 ms 183.43 ms 183.87 ms]
                        thrpt:  [21.755 KiB/s 21.806 KiB/s 21.841 KiB/s]
                 change:
                        time:   [-3.1397% -1.6538% -0.3257%] (p = 0.03 < 0.05)
                        thrpt:  [+0.3268% +1.6817% +3.2414%]
                        Change within noise threshold.
Benchmarking Secure Cell decryption - Seal, passphrase/1 MB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 10.0s.
Secure Cell decryption - Seal, passphrase/1 MB                                                                          
                        time:   [183.26 ms 183.70 ms 184.10 ms]
                        thrpt:  [5.4317 MiB/s 5.4436 MiB/s 5.4568 MiB/s]
                 change:
                        time:   [-4.0631% -1.6113% +0.5850%] (p = 0.25 > 0.05)
                        thrpt:  [-0.5816% +1.6377% +4.2352%]
                        No change in performance detected.
git checkout zrtp-goes-in-every-field

$ cargo bench -- --sample-size 10 passphrase
   Compiling autocfg v1.0.0
   Compiling lazy_static v1.4.0
   Compiling libc v0.2.70
   Compiling cfg-if v0.1.10
   Compiling serde v1.0.110
   Compiling maybe-uninit v2.0.0
   Compiling semver-parser v0.7.0
   Compiling byteorder v1.3.4
   Compiling memchr v2.3.3
   Compiling ryu v1.0.4
   Compiling proc-macro2 v1.0.13
   Compiling scopeguard v1.1.0
   Compiling unicode-xid v0.2.0
   Compiling pkg-config v0.3.17
   Compiling syn v1.0.22
   Compiling rayon-core v1.7.0
   Compiling either v1.5.3
   Compiling cc v1.0.53
   Compiling bitflags v1.2.1
   Compiling itoa v0.4.5
   Compiling unicode-width v0.1.7
   Compiling same-file v1.0.6
   Compiling regex-syntax v0.6.17
   Compiling zeroize v0.5.2
   Compiling oorandom v11.1.1
   Compiling semver v0.9.0
   Compiling crossbeam-utils v0.7.2
   Compiling memoffset v0.5.4
   Compiling crossbeam-epoch v0.8.2
   Compiling num-traits v0.2.11
   Compiling itertools v0.9.0
   Compiling textwrap v0.11.0
   Compiling walkdir v2.3.1
   Compiling rustc_version v0.2.3
   Compiling regex v1.3.7
   Compiling num_cpus v1.13.0
   Compiling atty v0.2.14
   Compiling libthemis-sys v0.12.0 (/tmp/themis/src/wrappers/themis/rust/libthemis-sys)
   Compiling csv-core v0.1.10
   Compiling cast v0.2.3
   Compiling regex-automata v0.1.9
   Compiling quote v1.0.6
   Compiling serde_json v1.0.53
   Compiling clap v2.33.1
   Compiling crossbeam-queue v0.2.1
   Compiling bstr v0.2.13
   Compiling tinytemplate v1.0.4
   Compiling plotters v0.2.14
   Compiling crossbeam-deque v0.7.3
   Compiling csv v1.1.3
   Compiling themis v0.12.0 (/tmp/themis/src/wrappers/themis/rust)
   Compiling criterion-plot v0.4.2
   Compiling rayon v1.3.0
   Compiling serde_derive v1.0.110
   Compiling criterion v0.3.2
   Compiling themis-core-bench v0.0.0 (/tmp/themis/benches/themis)
    Finished bench [optimized] target(s) in 3m 10s
     Running /tmp/themis/target/release/deps/secure_cell_seal_master_key-e5beafa1d7110cd8
Gnuplot not found, using plotters backend
     Running /tmp/themis/target/release/deps/secure_cell_seal_passphrase-9c8a032dbddb7caa
Gnuplot not found, using plotters backend
Benchmarking Secure Cell encryption - Seal, passphrase/64: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 9.9s.
Secure Cell encryption - Seal, passphrase/64                                                                          
                        time:   [180.60 ms 181.55 ms 182.82 ms]
                        thrpt:  [350.06   B/s 352.51   B/s 354.37   B/s]
                 change:
                        time:   [-1.8894% -0.7699% +0.3404%] (p = 0.21 > 0.05)
                        thrpt:  [-0.3392% +0.7759% +1.9258%]
                        No change in performance detected.
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high mild
Benchmarking Secure Cell encryption - Seal, passphrase/4 KB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 9.9s.
Secure Cell encryption - Seal, passphrase/4 KB                                                                          
                        time:   [180.39 ms 182.38 ms 184.89 ms]
                        thrpt:  [21.635 KiB/s 21.932 KiB/s 22.175 KiB/s]
                 change:
                        time:   [-2.3032% -1.2310% -0.1968%] (p = 0.05 > 0.05)
                        thrpt:  [+0.1972% +1.2464% +2.3575%]
                        No change in performance detected.
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high severe
Benchmarking Secure Cell encryption - Seal, passphrase/1 MB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 10.0s.
Secure Cell encryption - Seal, passphrase/1 MB                                                                          
                        time:   [181.05 ms 181.42 ms 182.22 ms]
                        thrpt:  [5.4878 MiB/s 5.5119 MiB/s 5.5233 MiB/s]
                 change:
                        time:   [-2.7368% -1.0604% +0.2133%] (p = 0.23 > 0.05)
                        thrpt:  [-0.2129% +1.0717% +2.8138%]
                        No change in performance detected.
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high severe

Benchmarking Secure Cell decryption - Seal, passphrase/64: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 9.9s.
Secure Cell decryption - Seal, passphrase/64                                                                          
                        time:   [181.06 ms 181.48 ms 182.00 ms]
                        thrpt:  [351.64   B/s 352.65   B/s 353.48   B/s]
                 change:
                        time:   [-1.0546% -0.5041% +0.1390%] (p = 0.12 > 0.05)
                        thrpt:  [-0.1388% +0.5066% +1.0658%]
                        No change in performance detected.
Benchmarking Secure Cell decryption - Seal, passphrase/4 KB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 9.9s.
Secure Cell decryption - Seal, passphrase/4 KB                                                                          
                        time:   [180.17 ms 181.53 ms 183.24 ms]
                        thrpt:  [21.829 KiB/s 22.035 KiB/s 22.202 KiB/s]
                 change:
                        time:   [-1.9808% -1.4592% -0.8246%] (p = 0.00 < 0.05)
                        thrpt:  [+0.8314% +1.4808% +2.0208%]
                        Change within noise threshold.
Found 2 outliers among 10 measurements (20.00%)
  1 (10.00%) high mild
  1 (10.00%) high severe
Benchmarking Secure Cell decryption - Seal, passphrase/1 MB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 10.0s.
Secure Cell decryption - Seal, passphrase/1 MB                                                                          
                        time:   [181.14 ms 181.58 ms 182.43 ms]
                        thrpt:  [5.4814 MiB/s 5.5071 MiB/s 5.5205 MiB/s]
                 change:
                        time:   [-1.4339% -0.8856% -0.1065%] (p = 0.03 < 0.05)
                        thrpt:  [+0.1066% +0.8935% +1.4547%]
                        Change within noise threshold.
Found 2 outliers among 10 measurements (20.00%)
  1 (10.00%) high mild
  1 (10.00%) high severe

Archlinux

didn't stored openssl/linux versions, look tomorrow

Archlinux
git checkout master 

$ cargo bench -- --sample-size 10 passphrase
    Finished bench [optimized] target(s) in 0.08s
     Running /tmp/themis2/target/release/deps/secure_cell_seal_master_key-52f2493607692f6b
Gnuplot not found, using plotters backend
     Running /tmp/themis2/target/release/deps/secure_cell_seal_passphrase-088337c6771ce84d
Gnuplot not found, using plotters backend
Benchmarking Secure Cell encryption - Seal, passphrase/64: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 8.4s.
Secure Cell encryption - Seal, passphrase/64                                                                          
                        time:   [152.50 ms 152.93 ms 153.36 ms]
                        thrpt:  [417.32   B/s 418.49   B/s 419.68   B/s]
Benchmarking Secure Cell encryption - Seal, passphrase/4 KB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 8.4s.
Secure Cell encryption - Seal, passphrase/4 KB                                                                          
                        time:   [153.01 ms 153.35 ms 153.74 ms]
                        thrpt:  [26.018 KiB/s 26.085 KiB/s 26.142 KiB/s]
Benchmarking Secure Cell encryption - Seal, passphrase/1 MB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 8.8s.
Secure Cell encryption - Seal, passphrase/1 MB                                                                          
                        time:   [160.51 ms 160.64 ms 160.77 ms]
                        thrpt:  [6.2202 MiB/s 6.2250 MiB/s 6.2303 MiB/s]
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high severe
Benchmarking Secure Cell decryption - Seal, passphrase/64: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 8.4s.
Secure Cell decryption - Seal, passphrase/64                                                                          
                        time:   [152.45 ms 152.59 ms 152.84 ms]
                        thrpt:  [418.75   B/s 419.42   B/s 419.81   B/s]
Benchmarking Secure Cell decryption - Seal, passphrase/4 KB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 8.4s.
Secure Cell decryption - Seal, passphrase/4 KB                                                                          
                        time:   [153.25 ms 153.37 ms 153.54 ms]
                        thrpt:  [26.051 KiB/s 26.080 KiB/s 26.101 KiB/s]
Benchmarking Secure Cell decryption - Seal, passphrase/1 MB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 8.8s.
Secure Cell decryption - Seal, passphrase/1 MB                                                                          
                        time:   [160.13 ms 160.36 ms 160.61 ms]
                        thrpt:  [6.2263 MiB/s 6.2361 MiB/s 6.2448 MiB/s]
Found 2 outliers among 10 measurements (20.00%)
  1 (10.00%) high mild
  1 (10.00%) high severe
git checkout zrtp-goes-in-every-field

$ cargo bench -- --sample-size 10 passphrase
   Compiling autocfg v1.0.0
   Compiling lazy_static v1.4.0
   Compiling cfg-if v0.1.10
   Compiling libc v0.2.70
   Compiling maybe-uninit v2.0.0
   Compiling semver-parser v0.7.0
   Compiling serde v1.0.110
   Compiling proc-macro2 v1.0.13
   Compiling ryu v1.0.4
   Compiling byteorder v1.3.4
   Compiling memchr v2.3.3
   Compiling unicode-xid v0.2.0
   Compiling scopeguard v1.1.0
   Compiling either v1.5.3
   Compiling rayon-core v1.7.0
   Compiling syn v1.0.22
   Compiling bitflags v1.2.1
   Compiling itoa v0.4.5
   Compiling cc v1.0.53
   Compiling pkg-config v0.3.17
   Compiling unicode-width v0.1.7
   Compiling same-file v1.0.6
   Compiling regex-syntax v0.6.17
   Compiling oorandom v11.1.1
   Compiling zeroize v0.5.2
   Compiling semver v0.9.0
   Compiling crossbeam-utils v0.7.2
   Compiling memoffset v0.5.4
   Compiling crossbeam-epoch v0.8.2
   Compiling num-traits v0.2.11
   Compiling itertools v0.9.0
   Compiling textwrap v0.11.0
   Compiling walkdir v2.3.1
   Compiling rustc_version v0.2.3
   Compiling regex v1.3.7
   Compiling cast v0.2.3
   Compiling libthemis-sys v0.12.0 (/tmp/themis2/src/wrappers/themis/rust/libthemis-sys)
   Compiling num_cpus v1.13.0
   Compiling atty v0.2.14
   Compiling quote v1.0.6
   Compiling csv-core v0.1.10
   Compiling serde_json v1.0.53
   Compiling clap v2.33.1
   Compiling regex-automata v0.1.9
   Compiling crossbeam-queue v0.2.1
   Compiling bstr v0.2.13
   Compiling tinytemplate v1.0.4
   Compiling plotters v0.2.14
   Compiling crossbeam-deque v0.7.3
   Compiling csv v1.1.3
   Compiling criterion-plot v0.4.2
   Compiling themis v0.12.0 (/tmp/themis2/src/wrappers/themis/rust)
   Compiling rayon v1.3.0
   Compiling serde_derive v1.0.110
   Compiling criterion v0.3.2
   Compiling themis-core-bench v0.0.0 (/tmp/themis2/benches/themis)
    Finished bench [optimized] target(s) in 1m 55s
     Running /tmp/themis2/target/release/deps/secure_cell_seal_master_key-e5beafa1d7110cd8
Gnuplot not found, using plotters backend
     Running /tmp/themis2/target/release/deps/secure_cell_seal_passphrase-9c8a032dbddb7caa
Gnuplot not found, using plotters backend
Benchmarking Secure Cell encryption - Seal, passphrase/64: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 9.6s.
Secure Cell encryption - Seal, passphrase/64                                                                          
                        time:   [159.81 ms 162.34 ms 167.66 ms]
                        thrpt:  [381.73   B/s 394.24   B/s 400.47   B/s]
                 change:
                        time:   [+4.9664% +7.5313% +10.224%] (p = 0.00 < 0.05)
                        thrpt:  [-9.2760% -7.0038% -4.7315%]
                        Performance has regressed.
Benchmarking Secure Cell encryption - Seal, passphrase/4 KB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 8.9s.
Secure Cell encryption - Seal, passphrase/4 KB                                                                          
                        time:   [158.21 ms 158.90 ms 160.06 ms]
                        thrpt:  [24.991 KiB/s 25.173 KiB/s 25.283 KiB/s]
                 change:
                        time:   [+3.5258% +4.0012% +4.4259%] (p = 0.00 < 0.05)
                        thrpt:  [-4.2384% -3.8472% -3.4057%]
                        Performance has regressed.
Benchmarking Secure Cell encryption - Seal, passphrase/1 MB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 9.2s.
Secure Cell encryption - Seal, passphrase/1 MB                                                                          
                        time:   [167.11 ms 174.01 ms 178.87 ms]
                        thrpt:  [5.5907 MiB/s 5.7468 MiB/s 5.9841 MiB/s]
                 change:
                        time:   [+3.5316% +5.5823% +8.1897%] (p = 0.00 < 0.05)
                        thrpt:  [-7.5697% -5.2872% -3.4111%]
                        Performance has regressed.
Found 2 outliers among 10 measurements (20.00%)
  1 (10.00%) high mild
  1 (10.00%) high severe
Benchmarking Secure Cell decryption - Seal, passphrase/64: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 9.2s.
Secure Cell decryption - Seal, passphrase/64                                                                          
                        time:   [168.87 ms 173.49 ms 176.24 ms]
                        thrpt:  [363.13   B/s 368.89   B/s 378.98   B/s]
                 change:
                        time:   [+6.9994% +10.126% +13.559%] (p = 0.00 < 0.05)
                        thrpt:  [-11.940% -9.1949% -6.5416%]
                        Performance has regressed.
Benchmarking Secure Cell decryption - Seal, passphrase/4 KB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 9.6s.
Secure Cell decryption - Seal, passphrase/4 KB                                                                          
                        time:   [162.82 ms 164.68 ms 168.27 ms]
                        thrpt:  [23.771 KiB/s 24.290 KiB/s 24.567 KiB/s]
                 change:
                        time:   [+6.4541% +7.9119% +9.7913%] (p = 0.00 < 0.05)
                        thrpt:  [-8.9181% -7.3318% -6.0628%]
                        Performance has regressed.
Found 3 outliers among 10 measurements (30.00%)
  1 (10.00%) low mild
  2 (20.00%) high severe
Benchmarking Secure Cell decryption - Seal, passphrase/1 MB: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 9.4s.
Secure Cell decryption - Seal, passphrase/1 MB                                                                          
                        time:   [171.29 ms 171.80 ms 172.24 ms]
                        thrpt:  [5.8057 MiB/s 5.8207 MiB/s 5.8382 MiB/s]
                 change:
                        time:   [+6.5818% +7.0829% +7.5411%] (p = 0.00 < 0.05)
                        thrpt:  [-7.0123% -6.6144% -6.1753%]
                        Performance has regressed.

@ilammy
Copy link
Collaborator Author

ilammy commented May 20, 2020

Alrighty. There seems to be some unexplained performance drop, but it’s not clear how exactly it’s linked to the implementation. Since this is a new feature, it won’t be a regression so I guess it’s okay to merge this as is, then do detailed profiling and optimizations later. I’ve noted this in out internal task tracker, I hope we’ll get back to this issue at some point.

@ilammy ilammy merged commit e4be2bd into cossacklabs:master May 20, 2020
@ilammy ilammy deleted the zrtp-goes-in-every-field branch May 20, 2020 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Themis Core written in C, its packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants