Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
9adfe84
Tests build configuration updated.
nemothenoone Jun 3, 2019
2480624
Merge branch '3-concept-compliance'
nemothenoone Jul 10, 2019
b016543
Merge branch '3-concept-compliance'
nemothenoone Jul 15, 2019
698283d
Merge branch '3-concept-compliance'
nemothenoone Jul 19, 2019
63f2962
Merge branch '3-concept-compliance'
nemothenoone Jul 20, 2019
0f2d204
Merge branch '3-concept-compliance'
nemothenoone Aug 4, 2019
42df72e
Merge branch '3-concept-compliance'
nemothenoone Sep 6, 2019
3767c69
Merge branch '3-concept-compliance'
nemothenoone Sep 8, 2019
79f0b9b
Merge branch '3-concept-compliance'
nemothenoone Sep 13, 2019
e045ba4
Merge branch '8-commons-refactoring'
nemothenoone Sep 14, 2019
23af003
Merge branch '8-commons-refactoring'
nemothenoone Sep 15, 2019
45e181f
Minor changes.
nemothenoone Sep 17, 2019
df498d0
Merge branch '3-concept-compliance'
nemothenoone Sep 26, 2019
b19ad37
Minor docs updates #3
nemothenoone Nov 14, 2019
7aa8fb1
Merge branch '3-concept-compliance' of github.com:nilfoundation/hash …
nemothenoone Nov 14, 2019
0ec4a9f
Docs updated #3
nemothenoone Nov 16, 2019
d1fad15
Implementation notes updated #3
nemothenoone Nov 21, 2019
8d9cc14
Hash accumulator set naming changes #3
nemothenoone Dec 22, 2019
432e7da
Merge branch '10-review-hash-constructions' into 3-concept-compliance
nemothenoone Dec 25, 2019
5f5fa8c
Minor issues fixed.
nemothenoone Feb 3, 2020
db1f97f
Minor temporary fixes #3
nemothenoone Feb 10, 2020
4b45736
Create README.md
nemothenoone Feb 10, 2020
ce7d626
Update README.md
nemothenoone Feb 10, 2020
4f0385c
Tests fixes. Construction definitions fixes #3
nemothenoone Feb 19, 2020
74bf658
Build issues fixed #3
nemothenoone Feb 19, 2020
4708ce4
Minor changes #3
nemothenoone Feb 19, 2020
72ffd21
Streebog implementation updated #3
nemothenoone Feb 20, 2020
d084688
Streebog implementation fixes #3
nemothenoone Feb 21, 2020
84efaec
Merge branch '3-concept-compliance'
nemothenoone Feb 21, 2020
ecc0e35
Minor documentation changes #3
nemothenoone Feb 29, 2020
7d6d3f3
Merge branch '3-concept-compliance'
nemothenoone Feb 29, 2020
e560016
More minor documentation changes #3
nemothenoone Feb 29, 2020
2f952c9
Merge branch '3-concept-compliance'
nemothenoone Feb 29, 2020
bc8a909
Related Pages links fixed
nkaskov Mar 1, 2020
bd14c9f
Documentation changes #3
nemothenoone Mar 3, 2020
a91dd56
Merge branch '3-concept-compliance'
nemothenoone Mar 3, 2020
6c15e72
Minor introduction updates #3
nemothenoone Mar 4, 2020
57679f8
Merge branch '3-concept-compliance' of github.com:nemo1369/hash into …
nemothenoone Mar 4, 2020
4cd142c
Merge branch '3-concept-compliance'
nemothenoone Mar 4, 2020
6f7a7e8
Merkle Damgaard append_length fix
nkaskov Mar 5, 2020
680fe19
Type traits updated #3
nemothenoone Mar 5, 2020
3fe0d01
Merge branch '3-concept-compliance'
nemothenoone Mar 5, 2020
c4ae641
Documentation grouping changes #3
nemothenoone Mar 5, 2020
d03688f
Merkle Damgaard append_length fix [1]
nkaskov Mar 5, 2020
760d814
Merge branch '3-concept-compliance'
nemothenoone Mar 5, 2020
b90eff3
Merge pull request #19 from NilFoundation/12-merkle-damgard
nkaskov Mar 5, 2020
8a51bf3
Little bug in basic_ghash_policy fixed
nkaskov Mar 5, 2020
664a3e1
Build configuration updated.
nemothenoone Mar 6, 2020
c41478c
Merge branch 'master' of github.com:nemo1369/hash
nemothenoone Mar 6, 2020
5d552db
Minor doxygen annotation changes #3
nemothenoone Mar 6, 2020
ebf3d3b
Merge branch '3-concept-compliance'
nemothenoone Mar 6, 2020
987c9b0
Algorithm description updated.
nemothenoone Mar 7, 2020
3ba3eaf
Documentation updated.
nemothenoone Mar 7, 2020
40f7911
Documentation updated.
nemothenoone Mar 7, 2020
5e3dadf
Compile problems resolved
nkaskov Mar 7, 2020
ffed59d
Some confusing names fixed
nkaskov Mar 12, 2020
3ba61ba
Intermediate changes
nkaskov Mar 16, 2020
ded65fa
Short byte messages partially fixed
nkaskov Mar 16, 2020
f3ca9b1
update_n padding fixed
nkaskov Mar 17, 2020
05d9338
Merkle damgard stream processor refactored
nkaskov Mar 17, 2020
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
119 changes: 25 additions & 94 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ if(CRYPTO3_HASH_BLAKE2B)
add_definitions(-D${CMAKE_UPPER_WORKSPACE_NAME}_HAS_BLAKE2B)
list(APPEND ${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS
${${CURRENT_PROJECT_NAME}_BLAKE2B_HEADERS})
list(APPEND ${CURRENT_PROJECT_NAME}_SOURCES
${${CURRENT_PROJECT_NAME}_BLAKE2B_SOURCES})
endif()

if(CRYPTO3_HASH_CHECKSUM_ADLER)
Expand All @@ -67,8 +65,6 @@ if(CRYPTO3_HASH_CHECKSUM_ADLER)
add_definitions(-D${CMAKE_UPPER_WORKSPACE_NAME}_HAS_ADLER)
list(APPEND ${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS
${${CURRENT_PROJECT_NAME}_ADLER32_HEADERS})
list(APPEND ${CURRENT_PROJECT_NAME}_SOURCES
${${CURRENT_PROJECT_NAME}_ADLER32_SOURCES})
endif()

if(CRYPTO3_HASH_CHECKSUM_CRC)
Expand All @@ -78,8 +74,6 @@ if(CRYPTO3_HASH_CHECKSUM_CRC)
add_definitions(-D${CMAKE_UPPER_WORKSPACE_NAME}_HAS_CRC)
list(APPEND ${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS
${${CURRENT_PROJECT_NAME}_CRC_HEADERS})
list(APPEND ${CURRENT_PROJECT_NAME}_SOURCES
${${CURRENT_PROJECT_NAME}_CRC_SOURCES})
endif()

if(CRYPTO3_HASH_GOST_34_11)
Expand All @@ -89,8 +83,6 @@ if(CRYPTO3_HASH_GOST_34_11)
add_definitions(-D${CMAKE_UPPER_WORKSPACE_NAME}_HAS_GOST_34_11)
list(APPEND ${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS
${${CURRENT_PROJECT_NAME}_GOST_34_11_HEADERS})
list(APPEND ${CURRENT_PROJECT_NAME}_SOURCES
${${CURRENT_PROJECT_NAME}_GOST_34_11_SOURCES})
endif()

if(CRYPTO3_HASH_KECCAK)
Expand All @@ -100,188 +92,127 @@ if(CRYPTO3_HASH_KECCAK)
add_definitions(-D${CMAKE_UPPER_WORKSPACE_NAME}_HAS_KECCAK)
list(APPEND ${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS
${${CURRENT_PROJECT_NAME}_KECCAK_HEADERS})
list(APPEND ${CURRENT_PROJECT_NAME}_SOURCES
${${CURRENT_PROJECT_NAME}_KECCAK_SOURCES})
endif()

if(CRYPTO3_HASH_MD4)
list(APPEND ${CURRENT_PROJECT_NAME}_MD4_HEADERS
include/nil/crypto3/hash/md4.hpp
)
include/nil/crypto3/hash/md4.hpp)

add_definitions(-D${CMAKE_UPPER_WORKSPACE_NAME}_HAS_MD4)
list(APPEND ${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS
${${CURRENT_PROJECT_NAME}_MD4_HEADERS}
)
list(APPEND ${CURRENT_PROJECT_NAME}_SOURCES
${${CURRENT_PROJECT_NAME}_MD4_SOURCES}
)
${${CURRENT_PROJECT_NAME}_MD4_HEADERS})
endif()

if(CRYPTO3_HASH_MD5)
list(APPEND ${CURRENT_PROJECT_NAME}_MD5_HEADERS
include/nil/crypto3/hash/md5.hpp
)
include/nil/crypto3/hash/md5.hpp)

add_definitions(-D${CMAKE_UPPER_WORKSPACE_NAME}_HAS_MD5)
list(APPEND ${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS
${${CURRENT_PROJECT_NAME}_MD5_HEADERS}
)
${${CURRENT_PROJECT_NAME}_MD5_HEADERS})
endif()

if(CRYPTO3_HASH_RIPEMD)
list(APPEND ${CURRENT_PROJECT_NAME}_RIPEMD_HEADERS
include/nil/crypto3/hash/detail/ripemd/ripemd_functions.hpp
include/nil/crypto3/hash/detail/ripemd/ripemd_policy.hpp
include/nil/crypto3/hash/ripemd.hpp
)
include/nil/crypto3/hash/ripemd.hpp)

add_definitions(-D${CMAKE_UPPER_WORKSPACE_NAME}_HAS_RIPEMD)
list(APPEND ${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS
${${CURRENT_PROJECT_NAME}_RIPEMD_HEADERS}
)
list(APPEND ${CURRENT_PROJECT_NAME}_SOURCES
${${CURRENT_PROJECT_NAME}_RIPEMD_SOURCES}
)
${${CURRENT_PROJECT_NAME}_RIPEMD_HEADERS})
endif()

if(CRYPTO3_HASH_SHA1)
list(APPEND ${CURRENT_PROJECT_NAME}_SHA1_HEADERS
include/nil/crypto3/hash/sha.hpp
include/nil/crypto3/hash/sha1.hpp
)
include/nil/crypto3/hash/sha1.hpp)

add_definitions(-D${CMAKE_UPPER_WORKSPACE_NAME}_HAS_SHA1)
list(APPEND ${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS
${${CURRENT_PROJECT_NAME}_SHA1_HEADERS}
)
${${CURRENT_PROJECT_NAME}_SHA1_HEADERS})
endif()

if(CRYPTO3_HASH_SHA2)
list(APPEND ${CURRENT_PROJECT_NAME}_SHA2_HEADERS
include/nil/crypto3/hash/sha.hpp
include/nil/crypto3/hash/sha2.hpp
)
include/nil/crypto3/hash/sha2.hpp)

list(APPEND ${CURRENT_PROJECT_NAME}_SHA2_SOURCES)

add_definitions(-D${CMAKE_UPPER_WORKSPACE_NAME}_HAS_SHA2_32)
add_definitions(-D${CMAKE_UPPER_WORKSPACE_NAME}_HAS_SHA2_64)

list(APPEND ${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS
${${CURRENT_PROJECT_NAME}_SHA2_HEADERS}
)
list(APPEND ${CURRENT_PROJECT_NAME}_SOURCES
${${CURRENT_PROJECT_NAME}_SHA2_SOURCES}
)
${${CURRENT_PROJECT_NAME}_SHA2_HEADERS})
endif()

if(CRYPTO3_HASH_SHA3)
list(APPEND ${CURRENT_PROJECT_NAME}_SHA3_HEADERS
include/nil/crypto3/hash/sha3.hpp
)
include/nil/crypto3/hash/sha3.hpp)

add_definitions(-D${CMAKE_UPPER_WORKSPACE_NAME}_HAS_SHA3)
list(APPEND ${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS
${${CURRENT_PROJECT_NAME}_SHA3_HEADERS}
)
list(APPEND ${CURRENT_PROJECT_NAME}_SOURCES
${${CURRENT_PROJECT_NAME}_SHA3_SOURCES}
)
${${CURRENT_PROJECT_NAME}_SHA3_HEADERS})
endif()

if(CRYPTO3_HASH_SKEIN)
list(APPEND ${CURRENT_PROJECT_NAME}_SKEIN_512_HEADERS
include/nil/crypto3/hash/skein.hpp
)
include/nil/crypto3/hash/skein.hpp)

add_definitions(-D${CMAKE_UPPER_WORKSPACE_NAME}_HAS_SKEIN_512)
list(APPEND ${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS
${${CURRENT_PROJECT_NAME}_SKEIN_512_HEADERS}
)
list(APPEND ${CURRENT_PROJECT_NAME}_SOURCES
${${CURRENT_PROJECT_NAME}_SKEIN_512_SOURCES}
)
${${CURRENT_PROJECT_NAME}_SKEIN_512_HEADERS})
endif()

if(CRYPTO3_HASH_SM3)
list(APPEND ${CURRENT_PROJECT_NAME}_SM3_HEADERS
include/nil/crypto3/hash/sm3.hpp
)
include/nil/crypto3/hash/sm3.hpp)

add_definitions(-D${CMAKE_UPPER_WORKSPACE_NAME}_HAS_SM3)
list(APPEND ${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS
${${CURRENT_PROJECT_NAME}_SM3_HEADERS}
)
list(APPEND ${CURRENT_PROJECT_NAME}_SOURCES
${${CURRENT_PROJECT_NAME}_SM3_SOURCES}
)
${${CURRENT_PROJECT_NAME}_SM3_HEADERS})
endif()

if(CRYPTO3_HASH_STREEBOG)
list(APPEND ${CURRENT_PROJECT_NAME}_STREEBOG_HEADERS
include/nil/crypto3/hash/streebog.hpp
)
include/nil/crypto3/hash/streebog.hpp)

add_definitions(-D${CMAKE_UPPER_WORKSPACE_NAME}_HAS_STREEBOG)
list(APPEND ${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS
${${CURRENT_PROJECT_NAME}_STREEBOG_HEADERS}
)
list(APPEND ${CURRENT_PROJECT_NAME}_SOURCES
${${CURRENT_PROJECT_NAME}_STREEBOG_SOURCES}
)
${${CURRENT_PROJECT_NAME}_STREEBOG_HEADERS})
endif()

if(CRYPTO3_HASH_TIGER)
list(APPEND ${CURRENT_PROJECT_NAME}_TIGER_HEADERS
include/nil/crypto3/hash/tiger.hpp
)
include/nil/crypto3/hash/tiger.hpp)

add_definitions(-D${CMAKE_UPPER_WORKSPACE_NAME}_HAS_TIGER)
list(APPEND ${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS
${${CURRENT_PROJECT_NAME}_TIGER_HEADERS}
)
list(APPEND ${CURRENT_PROJECT_NAME}_SOURCES
${${CURRENT_PROJECT_NAME}_TIGER_SOURCES}
)
${${CURRENT_PROJECT_NAME}_TIGER_HEADERS})
endif()

if(CRYPTO3_HASH_WHIRLPOOL)
list(APPEND ${CURRENT_PROJECT_NAME}_WHIRLPOOL_HEADERS
include/nil/crypto3/hash/whirlpool.hpp
)
include/nil/crypto3/hash/whirlpool.hpp)

add_definitions(-D${CMAKE_UPPER_WORKSPACE_NAME}_HAS_WHIRLPOOL)
list(APPEND ${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS
${${CURRENT_PROJECT_NAME}_WHIRLPOOL_HEADERS}
)
list(APPEND ${CURRENT_PROJECT_NAME}_SOURCES
${${CURRENT_PROJECT_NAME}_WHIRLPOOL_SOURCES}
)
${${CURRENT_PROJECT_NAME}_WHIRLPOOL_HEADERS})
endif()

if(CRYPTO3_HASH_CUBEHASH)
list(APPEND ${CURRENT_PROJECT_NAME}_CUBEHASH_HEADERS
include/nil/crypto3/hash/cubehash.hpp
include/nil/crypto3/hash/detail/cubehash_policy.hpp
)

list(APPEND ${CURRENT_PROJECT_NAME}_CUBEHASH_SOURCES
src/cubehash/cubehash.cpp
)
include/nil/crypto3/hash/detail/cubehash_policy.hpp)

add_definitions(-D${CMAKE_UPPER_WORKSPACE_NAME}_HAS_CUBEHASH)
list(APPEND ${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS
${${CURRENT_PROJECT_NAME}_CUBEHASH_HEADERS}
)
list(APPEND ${CURRENT_PROJECT_NAME}_SOURCES
${${CURRENT_PROJECT_NAME}_CUBEHASH_SOURCES}
)
${${CURRENT_PROJECT_NAME}_CUBEHASH_HEADERS})
endif()

list(APPEND ${CURRENT_PROJECT_NAME}_HEADERS
${${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS}
)
${${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS})

cm_setup_version(VERSION 0.1.0 PREFIX ${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME})

Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Hashes for =nil; Foundation's Cryptography Suite

Hashes for =nil; Foundation's cryptography suite.

## Building

This library uses Boost CMake build modules (https://github.com/BoostCMake/cmake_modules.git).
To actually include this library in a project it is required to:

1. Add [CMake Modules](https://github.com/BoostCMake/cmake_modules.git) as submodule to taget project repository.
2. Add all the internal dependencies using [CMake Modules](https://github.com/BoostCMake/cmake_modules.git) as submodules to target project repository.
3. Initialize parent project with [CMake Modules](https://github.com/BoostCMake/cmake_modules.git) (Look at [crypto3](https://github.com/nilfoundation/crypto3.git) for the example)

## Dependencies

### Internal
* [Block Ciphers](https://github.com/nilfoundation/block.git)

### External
* [Boost](https://boost.org) (>= 1.58)
4 changes: 2 additions & 2 deletions docs/concepts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Hash Concepts
## Hash Concepts {#hashes_concepts}

## Hash Concept
## Hash Concept {#hashes_concept}

A ```Hash``` is a function object for which the output depends only on the input and has a very low probability of yielding the same output given different input values.

Expand Down
Loading