summaryrefslogtreecommitdiff
path: root/include/ouroboros/hash.h
Commit message (Collapse)AuthorAgeFilesLines
* irmd: Revise IRMd internalsDimitri Staessens2024-02-191-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a full revision of the IRMd internal implementation. The registry is now a proper subcomponent managing its own internal lock (a single mutex). Some tests are added for the registry and its data structures. Some macros for tests are added in <ouroboros/test.h>. Flow allocation is now more symmetric between the client side (alloc) and server size (accept). Each will create a flow in pending state (ALLOC_PENDING/ACCEPT_PENDING) that is potentially fulfilled by an IPCP using respond_alloc and respond_accept primitives. Deallocation is split in flow_dealloc (application side) and ipcp_flow_dealloc (IPCP side) to get the flow in DEALLOC_PENDING and DEALLOCATED state. Cleanup of failed flow allocation is now properly handled instead of relying on the sanitizer thread. The new sanitizer only needs to monitor crashed processes. On shutdown, the IRMd will now detect hanging processes and SIGKILL them and clean up their fuse mountpoints if needed. A lot of other things have been cleaned up and shuffled around a bit. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* build: Update licenses to 2024Dimitri Staessens2024-01-131-1/+1
| | | | | | | Slow but steady. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* include: Revise printing hashesDimitri Staessens2023-08-231-7/+29
| | | | | | | | | | | The code was a bit convoluted to print hashes as hex strings. Renamed to HASH_FMT32 and HASH_VAL32 to make clear we are printing the first 32 bits only, and added options to print 64 up to 512 bits as well. This doesn't depend on endianness anymore. Adds a small test for the hash (printing) functions. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* lib: Refactor hash internalsDimitri Staessens2023-02-231-17/+6
| | | | | | | | The internal hash enum now matches the public one w.r.t. directory hash policies. This removes some unnecessary conversion. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* build: Update copyright to 2023Dimitri Staessens2023-02-131-1/+1
| | | | | | | 2022 was a rather slow year... Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* build: Update copyright to 2022Dimitri Staessens2022-04-031-1/+1
| | | | | | | Growing pains. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* build: Update email addressesDimitri Staessens2021-01-031-2/+2
| | | | | | | | The ugent email addresses are shut down, updated to Ouroboros mail addresses. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* build: Update copyright to 2021Dimitri Staessens2021-01-031-1/+1
| | | | | | | Happy New Year, Ouroboros! Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* build: Update copyright to 20200.16.0Dimitri Staessens2020-01-021-1/+1
| | | | | Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* build: Update copyright to 2019Dimitri Staessens2019-02-051-1/+1
| | | | | | | Updates the copyright notice in all sources to 2019. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* include, src: Update copyright to 2018Dimitri Staessens2018-01-091-1/+1
| | | | | | | Happy New Year, Ouroboros. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Fix CRC check and add frct_clearSander Vrijders2017-08-221-0/+2
| | | | | | This adds the CRC check by default on outgoing SDUs. It fixes some errors in the serialization and deserialization of the SDU. frct_clear was added to avoid bad initialization of the array of FRCT instances.
* lib: Add basic FRCT mechanismsSander Vrijders2017-08-171-1/+7
| | | | | | | | | | This adds the basic FRCT mechanisms to the library. Upon flow alloc or accept an FRCT instance is now created and used when reading or writing to the flow. The timerwheel has been refactored to allow recharging timers and removing them and is now part of the library. The first SDU sent over the connection has the DRF set and this initializes the connection. Sender and receiver inactivity timers are added.
* build: Replace fsf snail mail with contact URLdimitri staessens2017-08-131-2/+1
|
* build, lib, ipcpd, irmd: Add support for libgcryptdimitri staessens2017-08-091-4/+23
| | | | | | | | | | | | | | | | This adds support for libgcrypt. If at least version 1.7.0 of libgcrypt is present, it may be used for secure random number generation and is used for hashing in the irmd/ipcp. The hash definitions are moved to the internal hash.h header, and defined independently of the hashes that are defined as part of the directory policy for the normal IPCP. The translation is moved from the IRMd to ipcpd/ipcp.h. The bootstrap call from the IRMd expects the IPCP to return the correct hash algorithm with a dif_info struct, which is in line with the behavior of the enroll call. This also improves how some platform checks in the build system are handled.
* include: Fix formatting in list.hdimitri staessens2017-07-091-1/+0
|
* include: Fix macro for printing hashdimitri staessens2017-06-041-5/+6
|
* lib: Remove dependency on installed headersSander Vrijders2017-04-241-8/+2
| | | | | | | The header ipcp.h was not installed systemwide, giving compile time errors when trying to compile external programs that use irm.h. ipcp.h also included hash.h, which exposes project interal functions. The enum was moved to ipcp.h to prevent this.
* ipcpd: Allow specifying the hash algorithm to usedimitri staessens2017-04-161-3/+14
| | | | Currently CRC32, MD5, and SHA3 (224, 256, 384 and 512 bit) are supported.
* lib: Add implementation for MD5 hashesdimitri staessens2017-04-161-2/+3
|
* lib, ipcpd, irmd: Register hash instead of namedimitri staessens2017-04-131-0/+41
All information passed over the IRMd/IPCP boundary for using IPC services (flow allocation, registration) is now hashed. This effectively fixes the shared namespace between DIFs and the IRMDs. This PR also fixes some API issues (adding const identifiers), shuffles the include headers a bit and some small bugs.