Skip to content

Update F*, SSProve, ProVerif in sync #148

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

Draft
wants to merge 172 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
1a1705a
move key scheduling to seperate file
cmester0 Nov 5, 2024
e296d9a
Use xpd instead of derive_server
cmester0 Nov 6, 2024
7d046d3
Working xpd and xtr
cmester0 Nov 6, 2024
e9f370e
Use key struct
cmester0 Nov 6, 2024
c52f5e6
Working with TagKey
cmester0 Nov 6, 2024
69134a0
WIP on packages/games for KeySchedule
cmester0 Nov 13, 2024
665b72d
Filling in SSP package definitions
cmester0 Nov 27, 2024
c0ab4a3
Restructure proof
cmester0 Nov 29, 2024
911b913
Update proof
cmester0 Jan 7, 2025
0bf761a
getting fstar to verify without patches
karthikbhargavan Jan 12, 2025
9a2c613
Minor progress on proof
cmester0 Jan 12, 2025
551a5a7
Fixing extraction
cmester0 Jan 13, 2025
a2515dd
wip: panic freedom
karthikbhargavan Jan 14, 2025
c00e4ce
fsti
karthikbhargavan Jan 15, 2025
df9e597
pushing formats
karthikbhargavan Jan 15, 2025
3583640
Merge branch 'main' into fstar-fixes
karthikbhargavan Jan 16, 2025
ba07f35
fmt
karthikbhargavan Jan 16, 2025
3964f3e
secret integer fix
karthikbhargavan Jan 16, 2025
64a2505
cfg hax
karthikbhargavan Jan 16, 2025
aed4d9c
cfg hax
karthikbhargavan Jan 16, 2025
0ef31c7
cfg hax
karthikbhargavan Jan 16, 2025
f12e2c3
lint
karthikbhargavan Jan 16, 2025
213ade1
Merge branch 'main' into fstar-fixes
karthikbhargavan Jan 16, 2025
ff069c6
Build up to Core theorem statement
cmester0 Jan 18, 2025
f4477fe
Restructure to a dependency struct/class
cmester0 Jan 18, 2025
300463b
Restructure
cmester0 Jan 18, 2025
e322862
Restructure
cmester0 Jan 18, 2025
9ba00c8
Put d into dependencies
cmester0 Jan 18, 2025
4946f94
Cleanup extra files, and add more definitions
cmester0 Jan 19, 2025
6065f94
WIP on fixing key schedule impl
cmester0 Jan 21, 2025
a132369
WIP going to handles and key maps instead of directly using keys
cmester0 Jan 22, 2025
bcf16ae
Switch to using handlers
cmester0 Jan 23, 2025
3e79eac
Cleanup use of handles
cmester0 Jan 24, 2025
bc658e0
Add and fix issues for PSK?
cmester0 Jan 27, 2025
cbe7d75
Cleanup
cmester0 Jan 27, 2025
7933bbd
Update proof
cmester0 Jan 27, 2025
37f6064
Setup of key package hiearchy
cmester0 Jan 30, 2025
e20cc16
WIP on main theorem
cmester0 Jan 31, 2025
45a1aca
Make proof for multi-dimensioned hybrid proof easier
cmester0 Feb 10, 2025
9a3b214
Workaround extraction issues
jschneider-bensch Feb 11, 2025
539c262
Update
cmester0 Feb 11, 2025
072eca8
update actions
franziskuskiefer Feb 11, 2025
3a0de9f
`cargo fmt`
jschneider-bensch Feb 11, 2025
760e9bf
Update nix flake to main branch state
jschneider-bensch Feb 12, 2025
02cd040
Remove nix workflow
jschneider-bensch Feb 12, 2025
0caee30
Merge pull request #139 from cryspen/jonas/proverif-key-schedule
jschneider-bensch Feb 12, 2025
291243a
Fixing proofs
cmester0 Feb 12, 2025
453aef8
Re-index key packages, so GET is prev and SET is next
cmester0 Feb 19, 2025
9f4be82
Back to core theorem
cmester0 Feb 20, 2025
6f50450
Fixed structure all the way through
cmester0 Feb 21, 2025
2a109ea
Core package finally defined
cmester0 Feb 25, 2025
a53ad00
Most of setup done for core theorem
cmester0 Mar 3, 2025
4a3b513
Core theorem fully stated, missing lemmas and package definitions
cmester0 Mar 4, 2025
ada6daa
Merge branch 'main' into fstar-fixes
karthikbhargavan Mar 9, 2025
33c77fa
Merge branch 'main' into fstar-fixes
karthikbhargavan Mar 9, 2025
5bc4ef3
regen
karthikbhargavan Mar 9, 2025
a7d17ea
hand edits
karthikbhargavan Mar 9, 2025
de1b1e4
progress
karthikbhargavan Mar 9, 2025
a99f765
wip
karthikbhargavan Mar 9, 2025
731cafe
parse client hello progress
karthikbhargavan Mar 9, 2025
f8a4b56
formats panic free
karthikbhargavan Mar 9, 2025
b1acf10
added post conditions for handshake data
karthikbhargavan Mar 9, 2025
3889bc7
passed handshake
karthikbhargavan Mar 9, 2025
e480b43
record wip
karthikbhargavan Mar 9, 2025
d221503
WIP insert handwritten replacements
jschneider-bensch Mar 10, 2025
ef4f6ac
Restore PV extraction
jschneider-bensch Mar 10, 2025
d432e00
fewer hand edits
karthikbhargavan Mar 10, 2025
3ffa7ca
removed hand edits (except let rec bug) using decreases
karthikbhargavan Mar 10, 2025
1f7ebb0
no hand edits
karthikbhargavan Mar 11, 2025
ab8a230
removed self_ hacks
karthikbhargavan Mar 11, 2025
237ca24
Merge branch 'main' into fstar-fixes
karthikbhargavan Mar 11, 2025
5eee2e9
Move definitions to Core.v
cmester0 Mar 11, 2025
8b1231e
Valid PV
jschneider-bensch Mar 14, 2025
ea3a8c2
Not valid yet
jschneider-bensch Mar 14, 2025
6c4093d
Last couple of sub-theorem remain of core theorem
cmester0 Mar 17, 2025
5e0dd87
WIP
jschneider-bensch Mar 18, 2025
7b24520
Another sub-theorem (d6) done
cmester0 Mar 18, 2025
6ebf93e
Restored valid PV extraction
jschneider-bensch Mar 19, 2025
60b70a0
Missing `replace_body`
jschneider-bensch Mar 19, 2025
c835c63
wip
karthikbhargavan Mar 20, 2025
fc624a7
Fix missing PV body
jschneider-bensch Apr 2, 2025
93db2d7
Replace large integer comparison for ProVerif extraction
jschneider-bensch Apr 3, 2025
2cd3437
Full reachability
jschneider-bensch Apr 3, 2025
bfde034
Merge remote-tracking branch 'cmester0/key-schedule-security' into jo…
jschneider-bensch Apr 4, 2025
4ad9b1f
Merge branch 'jonas/key-schedule-security-merge' into artifact
jschneider-bensch Apr 4, 2025
0d8517a
Fix benchmark builds
jschneider-bensch Apr 4, 2025
347d72f
Syntactically valid PV extraction
jschneider-bensch Apr 4, 2025
4b03ed7
[PV Crutch] HashMap type
jschneider-bensch Apr 4, 2025
d2a2dc3
Benchmark results on RPi3
jschneider-bensch Apr 4, 2025
46a08ad
fig
karthikbhargavan Apr 8, 2025
b6b6b00
Reduce extraction to minimum
jschneider-bensch Apr 8, 2025
dd96907
Monomorphise KeySchedule
jschneider-bensch Apr 8, 2025
cf3c7c6
Almost good PV
jschneider-bensch Apr 8, 2025
b86898a
Merge remote-tracking branch 'origin/fstar-fixes' into artifact
jschneider-bensch Apr 9, 2025
d3d8cfc
restore extraction
karthikbhargavan Apr 10, 2025
c69bf18
fstar fixes
karthikbhargavan Apr 10, 2025
686444b
fixed up to Core.Hash
karthikbhargavan Apr 10, 2025
1338a9f
using bertie libs
karthikbhargavan Apr 10, 2025
66aefa9
fixed fstar extraction
karthikbhargavan Apr 10, 2025
02451d8
key schedule F*
karthikbhargavan Apr 10, 2025
5036ff2
Proverif blocked https://github.com/cryspen/hax/issues/1400
jschneider-bensch Apr 10, 2025
122393c
fstar restored
karthikbhargavan Apr 10, 2025
3d18610
fmt
karthikbhargavan Apr 10, 2025
bbca11b
Merge branch 'artifact' of github.com:cryspen/bertie into artifact
karthikbhargavan Apr 10, 2025
2b95348
fstar refresh
karthikbhargavan Apr 10, 2025
2c6bea4
lib.pvl valid PV
jschneider-bensch Apr 10, 2025
5351012
analysis.pv valid PV
jschneider-bensch Apr 10, 2025
972826b
more safety
karthikbhargavan Apr 10, 2025
69e2998
fmt
karthikbhargavan Apr 10, 2025
1c42fec
more safety
karthikbhargavan Apr 10, 2025
60b559c
more safety
karthikbhargavan Apr 10, 2025
c209846
Merge branch 'artifact' of github.com:cryspen/bertie into artifact
karthikbhargavan Apr 10, 2025
16eb717
merged
karthikbhargavan Apr 10, 2025
103ac44
record safety
karthikbhargavan Apr 10, 2025
f189a88
defensive serialization
karthikbhargavan Apr 11, 2025
ad5d88f
verified client-hello formatting using defensive style
karthikbhargavan Apr 11, 2025
6bf18f8
verified client-hello formatting using defensive style
karthikbhargavan Apr 11, 2025
259083f
server hello verification
karthikbhargavan Apr 11, 2025
f4da362
server hello verification
karthikbhargavan Apr 11, 2025
781a14a
server cert verification
karthikbhargavan Apr 11, 2025
e2034a8
up to finished, format verification
karthikbhargavan Apr 11, 2025
c70ba03
propagating certificates and other server info
karthikbhargavan Apr 11, 2025
0e07737
doc
karthikbhargavan Apr 11, 2025
9f9c802
Fix possible panic in key schedule
cmester0 Apr 12, 2025
617c869
add type information
cmester0 Apr 12, 2025
cda5997
Fix secret_integers test (missing imports?)
cmester0 Apr 12, 2025
6296e7a
Fix clippy formating test
cmester0 Apr 12, 2025
5e9f0fe
fmt
cmester0 Apr 12, 2025
e4304ad
Working on fixing ssprove extraction
cmester0 Apr 13, 2025
93b7bf5
Fixing ssprove impl translation
cmester0 Apr 13, 2025
323c2a8
fmt
cmester0 Apr 13, 2025
c6bad1f
Improving SSProve security proof
cmester0 Apr 14, 2025
862eccf
Merge pull request #149 from cryspen/artifact-transcripts
karthikbhargavan Apr 14, 2025
125ee98
Add patch file for SSProve extraction
cmester0 Apr 14, 2025
e16f70d
Merge branch 'artifact' of github.com:cryspen/bertie into artifact
cmester0 Apr 14, 2025
7af4b77
anonymization script
cmester0 Apr 14, 2025
2bfcfff
Working (non-PSK) queries
jschneider-bensch Apr 14, 2025
ca1207c
anonymize update
cmester0 Apr 14, 2025
e796579
Cleanup
jschneider-bensch Apr 14, 2025
d7afd66
Merge branch 'artifact' into server_pub_info
jschneider-bensch Apr 14, 2025
9ab0918
update anonymize script
cmester0 Apr 14, 2025
c3fb815
Add README for patch of SSProve
cmester0 Apr 14, 2025
342d406
Merge pull request #150 from cryspen/server_pub_info
jschneider-bensch Apr 15, 2025
35ae0ff
PV: Forward secrecy
jschneider-bensch Apr 15, 2025
3fa6a40
Fix anonymization
jschneider-bensch Apr 15, 2025
cd2d2fe
Merge branch 'artifact' of github.com:cryspen/bertie into artifact
jschneider-bensch Apr 15, 2025
8aab773
HNDL query
jschneider-bensch Apr 15, 2025
4a51d49
PV comments
jschneider-bensch Apr 15, 2025
a69c580
Artifact.md
jschneider-bensch Apr 15, 2025
121d4d7
Minor fix to SSProve extraction
cmester0 Apr 15, 2025
d2d8ac7
Remove generated makefiles
cmester0 Apr 15, 2025
0fbfabc
Proverif artifact instructions
jschneider-bensch Apr 15, 2025
56c722c
Merge branch 'artifact' of github.com:cryspen/bertie into artifact
jschneider-bensch Apr 15, 2025
72d2257
remove anonymize script after running it
cmester0 Apr 15, 2025
7a02f51
Remove obsolete patches and references to them
jschneider-bensch Apr 15, 2025
b6ebc25
Merge branch 'artifact' of github.com:cryspen/bertie into artifact
jschneider-bensch Apr 15, 2025
c1e7aa3
Remove reference to bertie-libs
jschneider-bensch Apr 15, 2025
8b2fb52
Remove .git as part of anonymization
jschneider-bensch Apr 15, 2025
714f24f
Cleanup SSProve folder
cmester0 Apr 15, 2025
a9b14bf
Merge branch 'artifact' of github.com:cryspen/bertie into artifact
jschneider-bensch Apr 15, 2025
c0d2eb7
Add description of SSProve to ARTIFACT
cmester0 Apr 15, 2025
c90ed4c
Merge branch 'artifact' of github.com:cryspen/bertie into artifact
jschneider-bensch Apr 15, 2025
b3c3425
Optimistic instructions for F*
jschneider-bensch Apr 15, 2025
6c7f346
Remove publications during anonymization
cmester0 Apr 15, 2025
99b603a
Remove flamegraph
jschneider-bensch Apr 15, 2025
7418e09
Merge branch 'artifact' of github.com:cryspen/bertie into artifact
jschneider-bensch Apr 15, 2025
e668959
Caseing breaks SSProve
cmester0 Apr 15, 2025
53d67ea
PV: Update PROOFS.md
jschneider-bensch Apr 15, 2025
4d8e162
Merge branch 'artifact' of github.com:cryspen/bertie into artifact
jschneider-bensch Apr 15, 2025
e758c18
Remove extraneous files for anonyization
jschneider-bensch Apr 15, 2025
eedb499
SSProve PROOFS.md
cmester0 Apr 15, 2025
4a9fdbc
Grammar/spell check
cmester0 Apr 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
# TODO: Check licenses, too.
with:
Expand Down
105 changes: 105 additions & 0 deletions ARTIFACT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Instructions for artifact evaluation

## Prerequisites
### Setting up the hax toolchain
We use the hax toolchain to extract proof artifacts from the Rust
source code in `src`. To be able to reproduce this extraction for
yourself, please follow the installation instructions for `hax`
provided at:

https://github.com/cryspen/hax?tab=readme-ov-file#installation

#### `hax-driver.py`
We use the Python 3 script `hax-driver.py` to drive extraction and
verification of the proof artifacts, so an installation of Python 3 is
required.

### Setting up F*
We use F* version 2025.03.25 to prove runtime safety and transcript
unambiguity as described in section 7 of the paper submission. To
reproduce these results for yourself, please install F* following the
instructions at:

https://fstar-lang.org/index.html#download

### Setting up Rocq + SSProve
We use Rocq version 8.18.0 and SSProve for the security proofs of the
key schedule as described in section 5 of the paper submission. Installation
instructions can be found at:

https://rocq-prover.org/install
https://github.com/SSProve/ssprove

Furthermore, Rust core library, which is used by the Hax translation, for Rocq/SSProve is located at:

https://github.com/cryspen/hax/tree/main/proof-libs

### Setting up ProVerif
We use ProVerif version 2.05 to perform protocol security analysis of the
implementation, as described in section 6 of the paper submission.
To be able to reproduce the analysis, please follow the installation
instructions provided at:

https://bblanche.gitlabpages.inria.fr/proverif/

## Proof extraction using hax
### F*
To regenerate the extraction to F*, run
```
./hax-driver.py extract-fstar
```

### SSProve
To regenerate the extraction for the key schedule in SSProve, run
```
./hax-driver.py extract-ssprove
```

To get the code running we apply a patch
```
patch -d extraction/ < extraction.patch
rm -rf fextraction/
mv extraction/ fextraction/
```

### ProVerif
The ProVerif proofs described in section 6 of the paper submission can
be extracted from the Rust source code by running
```
./hax-driver.py extract-proverif
```

This will generate the file `proofs/proverif/extraction/lib.pvl` from
the Rust source code.

## Running the Proofs
### F*
To run the F* proofs, run the following command:
```
./hax-driver.py typecheck
```

### SSProve
First generate the Makefile from the _CoqProject
```
coq_makefile -f _CoqProject -o Makefile
```
and run `make`.

### ProVerif
To run the ProVerif analysis, as described in section 6 of the paper
submission, run
```
./hax-driver.py typecheck-proverif
```

This will run the command
```
proverif -lib proofs/proverif/handwritten_lib.pvl -lib
proofs/proverif/extraction/lib.pvl proofs/proverif/extraction/analysis.pv
```
to start the analysis. The file `handwritten_lib.pvl` exists for
technical reasons and contains early
definitions of certain terms. The file `analysis.pvl` contains the
top-level protocol process and analysis queries, as described in
section 6 of the paper submission.
8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ libcrux-ed25519 = { version = "0.0.2-beta.3", git = "https://github.com/cryspen/
libcrux-ecdsa = { version = "0.0.2-beta.3", git = "https://github.com/cryspen/libcrux", features = [
"rand",
] }
hax-lib = { version = "0.2", git = "https://github.com/cryspen/hax" }
#hax-lib = { version = "0.2", git = "https://github.com/cryspen/hax" }
hax-lib = { git = "https://github.com/cryspen/hax" }

[features]
default = ["api", "std"]
default = ["api", "std", "defensive"]
defensive = []
std = []
test_utils = []
secret_integers = []
Expand Down Expand Up @@ -82,4 +84,4 @@ default-members = [
]

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(bench)'] }
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(bench)', 'cfg(hax)'] }
39 changes: 22 additions & 17 deletions PROOFS.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,29 @@ Using hax, we generate a ProVerif model of the TLS 1.3 handshake
in `proofs/proverif/extraction/lib.pvl`. This file contains the bulk of the extraction,
while `analysis.pv` contains the top-level processes are set up and analysis queries.

We provide patches that include changes to the extracted model (described below), which allow us to show
We can show
* that the modeled handshake can fully complete for both parties (as a baseline for further analysis)
* Server authenticity, assuming neither the certificate signing key nor a potential pre-shared key have been compromised
* Secrecy of the resulting session key under the same assumptions.
* Server authenticity, assuming the certificate signing key is not
compromised
* Forward secrecy of the resulting session key under the same assumptions.

The intended flow using the driver is to run

```
./hax-driver.py extract-proverif to extract the ProVerif model to proofs/proverif/extraction.
./hax-driver.py patch-proverif to apply the patches on the extracted model.
./hax-driver.py typecheck-proverif to run the analysis on the patched model.

The patches are necessary for parts of the model that we cannot currently generate (properly, or at all):
* a top-level process structure which instantiates Client and Server with ciphersuites and psk-mode configuration,
* event definitions and analysis queries,
* cryptographic operations and their semantics
* tls13formats related code, especially anything that relates to concatenation primitives

Additionally, the patches introduce the following modifications:
* A mock certificate validation, checking that the name in the certificate agrees with the name of the expected peer from the top-level process. This is because Bertie does not include full certificate validation at this time, but some binding between the name and the certificate is necessary for showing server authentication.
* A model-side fix for the issue that is fixed on the Rust side in Correct argument order for process_psk_binder_zero_rtt #101 (until that is fixed on the Rust side).
* The removal of all automatically generated events, since that leads to poor performance from ProVerif and is not necessary at all for the analysis (cf. [ProVerif] Emitting events unnecessarily blows up the extracted model hacspec/hax#581)
./hax-driver.py typecheck-proverif to run the analysis
```

## Security of the Key Schedule in SSProve

We extract the implementation of the Key Schedule from SSProve.
We then fix the implementation to only include the parts we need and make sure the translation is actually valid.
This is done with a patch file to allow easier updates to the implementation.

The proof for security of the key schedule is done on a specification.
The entry functions of the specification are generalized and then instantiated with the functions in the implementation.
We show the implemented functions fulfill some properties to be valid in the key schedule proof.

The proof for the specification follows the proof in "Key-schedule Security for the TLS 1.3 Standard."
We prove the Core Key Schedule Theorem by showing the main lemma D6.
The other lemmas are a direct consequence of the correct implementation of the cryptographic primitives, which we inherit from libcrux.
These lemmas are therefore only stated, and the proof is Admitted.
76 changes: 76 additions & 0 deletions anonymize.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
rm -rf assets/
rm -rf target/
rm -f CODEOWNERS
rm -f SECURITY.md
rm -f CODE_OF_CONDUCT.md
rm -f util/top1m.txt
rm -rf .github/ISSUE_TEMPLATE
rm -rf CLA.md
rm -rf bench.md
rm -rf LICENSE

### ACKNOWLEDGEMENTS

find ./README.md -not -path "./.git/*" -type f -exec sed -i -e '/assets/d' {} \;
find ./README.md -not -path "./.git/*" -type f -exec sed -i -e '/cryspen/d' {} \;

find ./README.md -not -path "./.git/*" -type f -exec sed -i -e '/PUBLICATIONS/d' {} \;
find ./README.md -not -path "./.git/*" -type f -exec sed -i -e '/a number of prior/d' {} \;
find ./README.md -not -path "./.git/*" -type f -exec sed -i -e '/Some of the most relevant/d' {} \;
find ./README.md -not -path "./.git/*" -type f -exec sed -i -e '/succinct, executable/d' {} \;
find ./README.md -not -path "./.git/*" -type f -exec sed -i -e '/Verified Models and Reference/d' {} \;
find ./README.md -not -path "./.git/*" -type f -exec sed -i -e '/A Messy State of the Union/d' {} \;

find . -not -path "./.git/*" -type f -exec sed -i -e '/reach out to Crypsen/d' {} \;

find . -not -path "./.git/*" -type f -exec sed -i -e '/LICENSE/d' {} \;
find . -not -path "./.git/*" -type f -exec sed -i -e '/licensed under/d' {} \;

# find . -not -path "./.git/*" -type f -exec sed -i -e '/ACKNOWLEDGEMENTS/d' {} \;
find . -not -path "./.git/*" -type f -exec sed -i -e '/The Bertie project./d' {} \;
find . -not -path "./.git/*" -type f -exec sed -i -e '/project tasks/d' {} \;
# find . -not -path "./.git/*" -type f -exec sed -i -e '/Cryspen/d' {} \;
find ./README.md -not -path "./.git/*" -type f -exec sed -i -e '/Inria/d' {} \;
find . -not -path "./.git/*" -type f -exec sed -i -e '/nlnet foundation/d' {} \;

find . -not -path "./.git/*" -type f -exec sed -i '/first authored Bertie/d' {} \;
find . -not -path "./.git/*" -type f -exec sed -i '/authors =/d' {} \;
find . -not -path "./.git/*" -type f -exec sed -i '/repository =/d' {} \;

######################################
# Replace instances of Bertie/bertie #
######################################

find . -not -path "./.git/*" -type f -name '*Bertie*' | while read FILE ; do
newfile="$(echo ${FILE} |sed -e 's/Bertie/T13/')" ;
mv "${FILE}" "${newfile}" ;
done

find . -not -path "./.git/*" -type f -iname '*bertie*' | while read FILE ; do
newfile="$(echo ${FILE} |sed -e 's/bertie/t13/')" ;
mv "${FILE}" "${newfile}" ;
done

find . -not -path "./.git/*" -not -path "./tests/*" -type f -exec sed -i 's/Bertie/T13/gi' {} \;
find . -not -path "./.git/*" -not -path "./tests/*" -type f -exec sed -i 's/bertie/t13/gi' {} \;
find ./tests -name "*.md" -type f -exec sed -i 's/bertie/t13/gi' {} \;
find ./tests -name "*.rs" -type f -exec sed -i 's/bertie/t13/gi' {} \;
find ./tests -name "*.sh" -type f -exec sed -i 's/bertie/t13/gi' {} \;

find ./Cargo.toml -type f -exec sed -i 's/bertie-libs/t13-libs/g' {} \;

rm Cargo.lock
cargo clean

### Checks

grep -riI bertie --exclude-dir=.git
grep -riI cryspen --exclude-dir=.git
grep -riI inria --exclude-dir=.git
grep -riI "Karthikeyan" --exclude-dir=.git
grep -riI "Karthikeyan Bhargavan" --exclude-dir=.git
find . -type f -iname '*bertie*'

rm -rf .git
rm -f anonymize.sh

90 changes: 90 additions & 0 deletions bench.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Raspberry Pi 3
```
_,met$$$$$gg. jonas@raspberrypi
,g$$$$$$$$$$$$$$$P. -----------------
,g$$P" """Y$$.". OS: Debian GNU/Linux 11 (bullseye) aarch64
,$$P' `$$$. Host: Raspberry Pi 3 Model B Rev 1.2
',$$P ,ggs. `$$b: Kernel: 6.1.21-v8+
`d$$' ,$P"' . $$$ Uptime: 2 hours, 41 mins
$$P d$' , $$P Packages: 660 (dpkg)
$$: $$. - ,d$$' Shell: bash 5.1.4
$$; Y$b._ _,d$P' Terminal: /dev/pts/0
Y$$. `.`"Y$$$$P"' CPU: BCM2835 (4) @ 1.200GHz
`$$b "-.__ Memory: 82MiB / 909MiB
`Y$$
`Y$$.
`$$b.
`Y$$b.
`"Y$b._
`"""
```

## Client
Client
- TLS_Chacha20Poly1305_SHA256 w/ EcdsaSecp256r1Sha256 | Secp256r1:
Handshake: 7122 μs | 140.4094748062547 /s
Application: 244 μs | 63.7759811051013 MB/s
Message Sizes: 200, 838, 58 bytes
- TLS_Chacha20Poly1305_SHA256 w/ EcdsaSecp256r1Sha256 | X25519:
Handshake: 4566 μs | 218.98451159470278 /s
Application: 245 μs | 63.71299735155773 MB/s
Message Sizes: 167, 805, 58 bytes
- TLS_Chacha20Poly1305_SHA256 w/ RsaPssRsaSha256 | Secp256r1:
Handshake: 21473 μs | 46.56802728954948 /s
Application: 254 μs | 61.3644019146746 MB/s
Message Sizes: 200, 2230, 58 bytes
- TLS_Chacha20Poly1305_SHA256 w/ RsaPssRsaSha256 | X25519:
Handshake: 18850 μs | 53.05039006817865 /s
Application: 254 μs | 61.42504065826636 MB/s
Message Sizes: 167, 2197, 58 bytes
- TLS_Chacha20Poly1305_SHA256 w/ EcdsaSecp256r1Sha256 | X25519Kyber768Draft00:
Handshake: 5582 μs | 179.1359595215902 /s
Application: 256 μs | 61.01392340465518 MB/s
Message Sizes: 1351, 1893, 58 bytes
- TLS_Chacha20Poly1305_SHA256 w/ EcdsaSecp256r1Sha256 | X25519MlKem768:
Handshake: 5487 μs | 182.24313662925482 /s
Application: 253 μs | 61.53509645857742 MB/s
Message Sizes: 1351, 1892, 58 bytes

## Client Stack
Client Stack Usage:
===================

Ciphersuite: TLS_Chacha20Poly1305_SHA256 w/ EcdsaSecp256r1Sha256 | Secp256r1
[Client Connect] Highest stack usage: 56.1 KB
[Client Read ] Highest stack usage: 5.9 KB

Ciphersuite: TLS_Chacha20Poly1305_SHA256 w/ EcdsaSecp256r1Sha256 | X25519
[Client Connect] Highest stack usage: 55.4 KB
[Client Read ] Highest stack usage: 5.9 KB

Ciphersuite: TLS_Chacha20Poly1305_SHA256 w/ RsaPssRsaSha256 | Secp256r1
[Client Connect] Highest stack usage: 56.1 KB
[Client Read ] Highest stack usage: 5.9 KB

Ciphersuite: TLS_Chacha20Poly1305_SHA256 w/ RsaPssRsaSha256 | X25519
[Client Connect] Highest stack usage: 55.4 KB
[Client Read ] Highest stack usage: 5.9 KB

Ciphersuite: TLS_Chacha20Poly1305_SHA256 w/ EcdsaSecp256r1Sha256 | X25519Kyber768Draft00
[Client Connect] Highest stack usage: 78.2 KB
[Client Read ] Highest stack usage: 5.9 KB

Ciphersuite: TLS_Chacha20Poly1305_SHA256 w/ EcdsaSecp256r1Sha256 | X25519MlKem768
[Client Connect] Highest stack usage: 78.2 KB
[Client Read ] Highest stack usage: 5.9 KB

## Server
Server
- TLS_Chacha20Poly1305_SHA256 w/ EcdsaSecp256r1Sha256 | Secp256r1:
Handshake: 5481 μs | 182.43040791837637 /s
Application: 259 μs | 60.18269424576024 MB/s
- TLS_Chacha20Poly1305_SHA256 w/ EcdsaSecp256r1Sha256 | X25519:
Handshake: 2819 μs | 354.63931635299485 /s
Application: 256 μs | 60.92005874557329 MB/s
- TLS_Chacha20Poly1305_SHA256 w/ RsaPssRsaSha256 | Secp256r1:
Handshake: 699193 μs | 1.430219917317012 /s
Application: 262 μs | 59.581248116755916 MB/s
- TLS_Chacha20Poly1305_SHA256 w/ RsaPssRsaSha256 | X25519:
Handshake: 694248 μs | 1.4404070652725713 /s
Application: 260 μs | 60.00107706253405 MB/s
Loading
Loading