This module provides polynomial hash algorithm.
◆ polynomial_hash_t
Polynomial Hash algorithm instance handle.
- Note
- It could be casted to pqlr_t instance linked to this handle
- See also
- polynomial_hash_to_pqlr
◆ polynomial_hash_free()
◆ polynomial_hash_get_hash()
PQLR_API void polynomial_hash_get_hash |
( |
const polynomial_hash_t |
polynomial_hash, |
|
|
const uint8_t * |
message, |
|
|
uint32_t |
message_length, |
|
|
const uint8_t * |
key, |
|
|
uint8_t * |
hash_tag |
|
) |
| |
Returns the result of polynomial hashing.
- Parameters
-
| polynomial_hash | Polynomial hash algorithm context. |
| message | Message to be hashed. |
| message_length | The length of the message |
| key | Key to be used for hashing. |
[out] | hash_tag | Result hash tag. |
Note that currently only 50bit keys are supported.
◆ polynomial_hash_get_hashtag_length_bits()
Obtains hashtag length in bits for current polynomial_hash instance.
- Parameters
-
polynomial_hash | initialized polynomial_hash instance |
- See also
- polynomial_hash_t
-
polynomial_hash_new
- Returns
- encoded request length
◆ polynomial_hash_get_hashtag_length_bytes()
Obtains hashtag length in bytes for current polynomial_hash instance.
- Parameters
-
polynomial_hash | initialized polynomial_hash instance |
- See also
- polynomial_hash_t
-
polynomial_hash_new
- Returns
- encoded request length
◆ polynomial_hash_get_key_length_bits()
Obtains key length in bits for current polynomial_hash instance.
- Parameters
-
polynomial_hash | initialized polynomial_hash instance |
- See also
- polynomial_hash_t
-
polynomial_hash_new
- Returns
- initiator's secret length
◆ polynomial_hash_get_keys_length_bytes()
Obtains key length in bytes for current polynomial_hash instance.
- Parameters
-
polynomial_hash | initialized polynomial_hash instance |
- See also
- polynomial_hash_t
-
polynomial_hash_new
- Returns
- initiator's secret length
◆ polynomial_hash_new()
Creates polynomial hash instance.
- Parameters
-
key_length | length of the key to be used while hashing (in bits) (min 2bit, max 128bit) |
- See also
- polynomial_hash_t
-
polynomial_hash_free
- Returns
- new polynomial_hash instance or
NULL
if out of memory
◆ polynomial_hash_to_pqlr()
Casts polynomial_hash instance to pqlr instance.
- Parameters
-
polynomial_hash | initialized polynomial hash instance |
- Note
- this pqlr instance will be released by polynomial_hash_free
- See also
- polynomial_hash_t
-
pqlr_t
-
polynomial_hash_free
- Returns
- operable pqlr instance or
NULL
if polynominal_hash is NULL