Skip to content

Commit c466968

Browse files
authored
Merge pull request #55 from itzmeanjan/bump-sha3-version
Bump dependency `sha3` to latest commit
2 parents 61cf680 + 6302be2 commit c466968

7 files changed

+699
-1679
lines changed

.github/workflows/test_ci.yml

Lines changed: 16 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -20,44 +20,30 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@v4
2222

23-
- name: Setup Google Test
24-
uses: Bacondish2023/setup-googletest@v1
25-
with:
26-
tag: v1.15.2
27-
23+
- name: Setup Google-Test
24+
run: |
25+
pushd ~
26+
git clone https://github.com/google/googletest.git -b v1.16.0
27+
pushd googletest
28+
mkdir build
29+
pushd build
30+
cmake .. -DBUILD_GMOCK=OFF
31+
make
32+
sudo make install
33+
popd
34+
popd
35+
popd
2836
2937
- name: Build and Test (${{ matrix.compiler }}, ${{ matrix.build_type }}, ${{ matrix.test_type }})
3038
run: |
3139
CXX=${{ matrix.compiler }}
3240
if [[ ${{ matrix.test_type }} == "standard" ]]; then
33-
make test -j 2>&1 | tee build.log
41+
make test -j
3442
else
35-
make ${{ matrix.build_type }}_${{ matrix.test_type }}_test -j 2>&1 | tee build.log
43+
make ${{ matrix.build_type }}_${{ matrix.test_type }}_test -j
3644
fi
37-
if [ $? -ne 0 ]; then
38-
echo "Build or Test Failed! See build.log for details."
39-
exit 1
40-
fi
41-
42-
- name: Upload Build Log
43-
uses: actions/upload-artifact@v3
44-
with:
45-
name: build-log-${{ matrix.compiler }}-${{ matrix.build_type }}-${{ matrix.test_type }}
46-
path: build.log
47-
4845
4946
- name: Run Examples
5047
if: ${{ matrix.test_type == 'standard' && matrix.build_type == 'release' }}
5148
run: |
52-
CXX=${{ matrix.compiler }} make example -j 2>&1 | tee example.log
53-
if [ $? -ne 0 ]; then
54-
echo "Example execution Failed! See example.log for details."
55-
exit 1
56-
fi
57-
58-
- name: Upload Example Log (if failed)
59-
if: ${{ steps.Run_Examples.outcome != 'success' && matrix.test_type == 'standard' && matrix.build_type == 'release' }}
60-
uses: actions/upload-artifact@v3
61-
with:
62-
name: example-log-${{ matrix.compiler }}
63-
path: example.log
49+
CXX=${{ matrix.compiler }} make example -j

README.md

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ Decapsulation | Secret Key and Cipher Text | 32B Shared Secret
2020

2121
Here I'm maintaining `ml-kem` - a C++20 header-only fully `constexpr` library, implementing ML-KEM, supporting ML-KEM-{512, 768, 1024} parameter sets, as defined in table 2 of ML-KEM standard. It's pretty easy to use, see [usage](#usage). It shows following performance characteristics on desktop and server grade CPUs.
2222

23-
ML-KEM-768 Algorithm | Time taken on "12th Gen Intel(R) Core(TM) i7-1260P" | Time taken on "Raspberry Pi 4B" | Time taken on "AWS EC2 Instance c8g.large"
24-
--- | --: | --: | --:
25-
keygen | 23.9us | 114.3us | 35.5us
26-
encaps | 27.7us | 133.8us | 40.4us
27-
decaps | 30.1us | 157.6us | 45us
23+
ML-KEM-768 Algorithm | Time taken on "12th Gen Intel(R) Core(TM) i7-1260P" | Time taken on "AWS EC2 Instance c8g.large"
24+
--- | --: | --:
25+
keygen | 22.3us | 31.5us
26+
encaps | 25.6us | 35.9us
27+
decaps | 30.1us | 43.7us
2828

2929
> [!NOTE]
3030
> Find ML-KEM standard @ https://doi.org/10.6028/NIST.FIPS.203 - this is the document that I followed when implementing ML-KEM. I suggest you go through the specification to get an in-depth understanding of the scheme.
@@ -103,22 +103,10 @@ make perf -j # If you have built google-benchmark library with libPFM supp
103103
> When benchmarking, ensure that you've disabled CPU frequency scaling, by following guide @ https://github.com/google/benchmark/blob/main/docs/reducing_variance.md.
104104
105105
### On 12th Gen Intel(R) Core(TM) i7-1260P
106-
107-
Compiled with **g++ (Ubuntu 14.2.0-4ubuntu2) 14.2.0**, while running kernel `Linux 6.8.0-41-generic x86_64`.
108-
109-
Benchmark results are in JSON format @ [bench_result_on_Linux_6.11.0-9-generic_x86_64_with_g++_14](./bench_result_on_Linux_6.11.0-9-generic_x86_64_with_g++_14.json).
110-
111-
### On ARM Cortex-A72 i.e. Raspberry Pi 4B
112-
113-
Compiled with **g++ (Debian 12.2.0-14) 12.2.0**, while running kernel `Linux 6.6.51+rpt-rpi-v8 aarch64`.
114-
115-
Benchmark results are in JSON format @ [bench_result_on_Linux_6.6.51+rpt-rpi-v8_aarch64_with_g++_12](./bench_result_on_Linux_6.6.51+rpt-rpi-v8_aarch64_with_g++_12.json).
106+
Benchmark results are in JSON format @ [bench_result_on_Linux_6.11.0-19-generic_x86_64_with_g++_14](./bench_result_on_Linux_6.11.0-19-generic_x86_64_with_g++_14.json).
116107

117108
### On AWS EC2 Instance `c8g.large` i.e. AWS Graviton4
118-
119-
Compiled with **g++ (Ubuntu 13.2.0-23ubuntu4) 13.2.0**, while running kernel `Linux 6.8.0-1016-aws aarch64`. More about this EC2 instance @ https://aws.amazon.com/ec2/instance-types/c8g.
120-
121-
Benchmark results are in JSON format @ [bench_result_on_Linux_6.8.0-1016-aws_aarch64_with_g++_13](./bench_result_on_Linux_6.8.0-1016-aws_aarch64_with_g++_13.json).
109+
Benchmark results are in JSON format @ [bench_result_on_Linux_6.8.0-1021-aws_aarch64_with_g++_13](./bench_result_on_Linux_6.8.0-1021-aws_aarch64_with_g++_13.json).
122110

123111
## Usage
124112

0 commit comments

Comments
 (0)