https://github.com/innovativeinventor/constant-time-benchmark
Benchmarking various constant time algorithms to validate various implementations against side-channel attacks in Golang
https://github.com/innovativeinventor/constant-time-benchmark
golang security-audit side-channel timing-attacks
Last synced: about 2 months ago
JSON representation
Benchmarking various constant time algorithms to validate various implementations against side-channel attacks in Golang
- Host: GitHub
- URL: https://github.com/innovativeinventor/constant-time-benchmark
- Owner: InnovativeInventor
- License: mit
- Created: 2019-12-13T19:37:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-31T04:54:50.000Z (over 6 years ago)
- Last Synced: 2025-11-19T17:05:54.871Z (7 months ago)
- Topics: golang, security-audit, side-channel, timing-attacks
- Language: Jupyter Notebook
- Homepage:
- Size: 1.35 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Constant Time Benchmark
This repo is designed to test and validate various constant time algorithms in
various libraries/languages to ensure that there are no leaks.
Right now, most of the proof of concept code is in `benchmark.ipynb`.
## Golang Number Comparison Stats (standard implementation)
(Should be quicker)
```python
print(sns.kdeplot(dataset_0, shade=True))
```
AxesSubplot(0.125,0.125;0.775x0.755)
Mean 179.13993677555322
Median 172.0
Min 102.0
Std 46.70515679933401

(Should take longer)
```python
print(sns.kdeplot(dataset_0, shade=True))
```
Mean 181.5736945698738
Median 175.0
Min 102.0
Std 47.23551601113846
AxesSubplot(0.125,0.125;0.775x0.755)

Conclusion: It appears that there is little need for constant-time number comparisons in Golang as this already happens with numbers of the same size.
Note: Do not rely on this data alone. Variations in timing/attacks may exist on different devices, implementations, and versions of Golang. Always be cautious.
## License
See `LICENSE`