Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Various cryptography material implementation from my course at Polytechnique

License

Notifications You must be signed in to change notification settings

acmo0/Crypto-implementations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

3 Commits

Repository files navigation

Crypto implementation from my course at Polytechnique Institute of Paris

WARNING : this is for educational purpose only, this code may contains bugs and is not secure (timing attacks for exemple)

Content :

Name Optimized ?
Shake128 Yes
Poly1305 Mostly

Benchmarks

Shake128

Note : generated using hyperfine on a ~78Mo file, see below the table for the full output

Implementation Time consumed (absolute)
OpenSSL 198 ms
Python (hashlib) 209 ms
Rust (tiny-keccak, quoted in Keccak website) 198 ms
My implementation 208 ms

Poly1305

The idea is to split the 130 bits field integer in 5 separates 26 bits limbs represented by u64. It allows to handle such integers without any dependancy and to propagate the carry more efficiently. I implemented a naive addition on top of that. It might be more optimized to split the 130 bits differently by using u128 integers instead of u64, reducing the number of limbs but I did not tried. This first "naive" implementation focused on arithmetic optimization gave a throughput of approx. 3.7 cycles/byte.

About

Various cryptography material implementation from my course at Polytechnique

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /