Improved ID-based Proxy Signature Scheme with Message Recovery
Improved version provided by Caixue Zhou of the Singh and Verma’s proxy signature scheme with message recovery.
Loading...
Searching...
No Matches
shared.h
Go to the documentation of this file.
1
7#ifndef SHARED_H
8#define SHARED_H
9
10#include <string.h>
11#include <assert.h>
12#include <pbc/pbc.h>
13#include <nettle/sha1.h>
14#include <nettle/sha2.h>
15#include "data.h"
16
23unsigned int non_generic_dlog_secure_size_by_security_level(unsigned int sec_lvl);
24
34uint16_t hash(uint8_t digest[MAX_DIGEST_SIZE], const void *data, size_t len, hash_type_t hash_type);
35
44uint16_t hash_element(uint8_t digest[MAX_DIGEST_SIZE], element_t e, hash_type_t hash_type);
45
55void hash_warrant_and_r(element_t h, element_t r, warrant_t m, hash_type_t hash_type);
56
67void calculate_beta(uint8_t beta[], const uint8_t msg[], size_t msg_size, sv_public_params_t public_p);
68
75void params_init(pbc_param_t pairings_p, int sec_lvl);
76
88void setup(sv_public_params_t public_p, sv_secret_params_t secret_p, int sec_lvl, hash_type_t hash_type);
89
100void setup_from_params(sv_public_params_t public_p, sv_secret_params_t secret_p, hash_type_t hash_type, pbc_param_t pairing_p);
101
113void setup_from_str(sv_public_params_t public_p, sv_secret_params_t secret_p, char pairing_p_str[]);
114
120void public_params_pp(sv_public_params_t public_p);
121
130void extract_p(sv_user_t user, sv_public_params_t public_p);
131
141void extract_s(sv_user_t user, sv_secret_params_t secret_p);
142
157void delegate(delegation_t w, sv_user_t from, sv_user_t to, sv_public_params_t public_p);
158
172int del_verify(delegation_t w, sv_public_params_t public_p);
173
187void pk_gen(element_t k_sign, sv_user_t user, delegation_t w, sv_public_params_t public_p);
188
189#endif // SHARED_H
Header file containing the data structures used by the scheme and the functions used to manage them.
uint16_t hash(uint8_t digest[MAX_DIGEST_SIZE], const void *data, size_t len, hash_type_t hash_type)
Generate the digest of the data using the hash_type algorithm.
Definition: shared.c:18
void hash_warrant_and_r(element_t h, element_t r, warrant_t m, hash_type_t hash_type)
hash both the warrant and the random value r and return the result in h, an element of Zq*.
Definition: shared.c:53
void setup_from_params(sv_public_params_t public_p, sv_secret_params_t secret_p, hash_type_t hash_type, pbc_param_t pairing_p)
Initialization function for the scheme. It takes as input the hash function to use and the parameters...
Definition: shared.c:108
void setup_from_str(sv_public_params_t public_p, sv_secret_params_t secret_p, char pairing_p_str[])
Initialization function for the scheme. It takes as input the string representation of the parameters...
Definition: shared.c:135
int del_verify(delegation_t w, sv_public_params_t public_p)
Verifies the validity of a delegation. After receiving the delegation W = (m, r, S),...
Definition: shared.c:278
void pk_gen(element_t k_sign, sv_user_t user, delegation_t w, sv_public_params_t public_p)
Produces a proxy signing key from a delegation. If the delegate used accepts the delegation,...
Definition: shared.c:316
void delegate(delegation_t w, sv_user_t from, sv_user_t to, sv_public_params_t public_p)
Delegates the right to sign messages to the identity id. The original signer selects k in Zq* and com...
Definition: shared.c:233
void extract_p(sv_user_t user, sv_public_params_t public_p)
Produces the public key pk_id from an identity. It uses the hash function H0 to map the any string {0...
Definition: shared.c:208
void calculate_beta(uint8_t beta[], const uint8_t msg[], size_t msg_size, sv_public_params_t public_p)
Calculate the value of beta. Starting from the message to be signed and the public parameters of the ...
Definition: shared.c:64
unsigned int non_generic_dlog_secure_size_by_security_level(unsigned int sec_lvl)
Get the size of the non generic dlog secure size based on the NIST suggestions.
Definition: shared.c:3
void extract_s(sv_user_t user, sv_secret_params_t secret_p)
Produces the secret key sk_id from an identity. It uses the hash function H0 to map the any string {0...
Definition: shared.c:218
void params_init(pbc_param_t pairings_p, int sec_lvl)
Initialize the pairings parameters.
Definition: shared.c:95
uint16_t hash_element(uint8_t digest[MAX_DIGEST_SIZE], element_t e, hash_type_t hash_type)
Generate the digest of the element using the hash_type algorithm.
Definition: shared.c:45
void public_params_pp(sv_public_params_t public_p)
Apply all possible precomputations on the public parameters.
Definition: shared.c:189
void setup(sv_public_params_t public_p, sv_secret_params_t secret_p, int sec_lvl, hash_type_t hash_type)
Initialization function for the scheme. It takes as input a security parameter lambda and the hash fu...
Definition: shared.c:100