Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build artifacts
/build/
/build*/
CMakeFiles/
CMakeCache.txt
cmake_install.cmake
Expand Down Expand Up @@ -55,3 +55,6 @@ __pycache__/
*~
.DS_Store
Thumbs.db

#Environment files
.env
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,10 @@ if(BUILD_TESTING)
include(CTest)
endif()

add_subdirectory(third_party)
add_subdirectory(third_party)
add_subdirectory(src)
add_subdirectory(bench)

if(BUILD_TESTING)
add_subdirectory(tests)
endif()
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,32 @@ git submodule update --init --recursive
./build/bench/bench_batch --algo hypericum --batch-size 16 --iterations 100
```

### Paramset Selection

Both Hypericum and Kryzhovnik support build-time paramset selection via CMake.

```bash
cmake -S . -B build \
-DHYPERICUM_PARAMSET=m_128_20 \
-DKRYZHOVNIK_PARAMSET=medium
cmake --build build --parallel
```

Supported Kryzhovnik values: `small`, `medium`, `large`, `debug`.

`debug` is intended for fast diagnostics and troubleshooting, not security evaluation.

The benchmark helper script also supports separate flags:

```bash
./scripts/benchmark.sh \
--algo kryzhovnik \
--kryzhovnik-params small \
--hypericum-params m_128_20
```

Note: Kryzhovnik constants are aligned with `security.sage` for `small/medium/large`. Keep validating against the official specification before production use.

### Expected Output (after MVP)

After running benchmarks, the `results/` directory will contain:
Expand Down
26 changes: 26 additions & 0 deletions README_ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,32 @@ git submodule update --init --recursive
./build/bench/bench_batch --algo hypericum --batch-size 16 --iterations 100
```

### Выбор paramset

Для Hypericum и Kryzhovnik поддерживается выбор набора параметров на этапе сборки через CMake.

```bash
cmake -S . -B build \
-DHYPERICUM_PARAMSET=m_128_20 \
-DKRYZHOVNIK_PARAMSET=medium
cmake --build build --parallel
```

Поддерживаемые значения для Kryzhovnik: `small`, `medium`, `large`, `debug`.

`debug` предназначен для быстрой диагностики и отладки, а не для оценки стойкости.

В benchmark-скрипте можно задавать наборы отдельно:

```bash
./scripts/benchmark.sh \
--algo kryzhovnik \
--kryzhovnik-params small \
--hypericum-params m_128_20
```

Примечание: константы Kryzhovnik для `small/medium/large` синхронизированы со скриптом `security.sage`; перед production-использованием их нужно дополнительно верифицировать по официальной спецификации.

### Ожидаемые результаты (после MVP)

После запуска бенчмарков в директории `results/` появятся:
Expand Down
5 changes: 5 additions & 0 deletions bench/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
add_executable(bench_seq bench_seq.c)

target_link_libraries(bench_seq PRIVATE batch_bench_adapters)

target_compile_features(bench_seq PRIVATE c_std_99)
Loading
Loading