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
define.h
Go to the documentation of this file.
1
7#ifndef DEFINE_H
8#define DEFINE_H
9
10#ifndef VERSION
11#define VERSION "0.1"
12#endif
13#ifndef PROJECT_NAME
14#define PROJECT_NAME "IdSignature"
15#endif
16
17#define DEFAULT_SEC_LVL 80
18#define DEFAULT_HASH_TYPE sha_1
19
20// Usage tooltip
21#define USAGE \
22 "Usage: %s [options] <operation> [<input data> ...]\n\
23Use -h to know more informations\n\
24Operations:\n\
25\tsetup - generate all the parameters for the scheme and outputs them\n\
26\tkeygen <pairing params> <identity> [identity ...] - generate a new key pair for the provided identities\n\
27\tdelegate <pairing params> <key> <from> <to> - generate a delegation for the 'to' identity made valid through the use of the secret key belonging to the 'from' identity\n\
28\tdel_verify <pairing params> <delegation file> - checks if the delegation in the provided file is valid\n\
29\tpk_gen <pairing params> <key> <delegation file> - generate a signing key the delegated user can use to sign on behalf of the original user\n\
30\tp_sign <pairing params> <delegation file> <p_sig file> <message> - sign the provided message with the proxy key in the provided file\n\
31\tsign_verify <pairing params> <delegation file> <signature file> - verify the signature in the provided file\n"
32
33// Help tooltip
34#define HELP_TOOLTIP \
35 "---------------------------------------------------------------------\n\
36" PROJECT_NAME ", version " VERSION "\n\
37Usage: %s \n\
38---------------------------------------------------------------------\n\
39Operations:\n\
40\tsetup - generate all the parameters for the scheme and outputs them\n\
41\tkeygen <pairing params> <identity> [identity ...] - generate a new key pair for the provided identities\n\
42\tdelegate <pairing params> <key> <from> <to> - generate a delegation for the 'to' identity made valid through the use of the secret key belonging to the 'from' identity\n\
43\tdel_verify <pairing params> <delegation file> - checks if the delegation in the provided file is valid\n\
44\tpk_gen <pairing params> <key> <delegation file> - generate a signing key the delegated user can use to sign on behalf of the original user\n\
45\tp_sign <pairing params> <delegation file> <p_sig file> <message> - sign the provided message with the proxy key in the provided file\n\
46\tsign_verify <pairing params> <delegation file> <signature file> - verify the signature in the provided file\n\
47---------------------------------------------------------------------\n\
48Options:\n\
49\t-h - shows the help tooltip\n\
50\t-v - use verbose output\n\
51\t-p - use precomputation where possible\n\
52\t-i - use the improved version of the scheme\n\
53\t-a - hash algorithm [sha1, sha256, sha512] (sha1)\n\
54\t-l - security level (80)\n\
55\t-o - redirect output of the application to this file\n\
56\t-s - if set, use the seed for random functions\n"
57
58#ifndef NVERBOSE
59#define VERBOSE_PRINT(...) \
60 if (verbose) \
61 { \
62 printf(__VA_ARGS__); \
63 }
64#else
65#define VERBOSE_PRINT(...)
66#endif
67
68#define PARAMS_ERROR(expected, actual, argv) \
69 if (actual < expected) \
70 { \
71 fprintf(stderr, "Expected %d parameters, got %d\n", expected, actual); \
72 fprintf(stderr, USAGE, argv[0]); \
73 exit(EXIT_FAILURE); \
74 }
75
76extern int verbose;
77
78#endif // DEFINE_H