29 #ifndef __BOLOS_CRYPTO_COMMON_H__
31 #define __BOLOS_CRYPTO_COMMON_H__
85 #define BLS_LAST (1<<0)
90 #define BLS_SIG_MODE (1<<1)
95 #define BLS_MASK_SIGCRYPT (3<<1)
96 #define BLS_ENCRYPT (2<<1)
97 #define BLS_DECRYPT (0<<1)
98 #define BLS_SIGN (BLS_SIG_MODE|BLS_ENCRYPT)
99 #define BLS_VERIFY (BLS_SIG_MODE|BLS_DECRYPT)
105 #define BLS_MASK_PAD (7<<3)
106 #define BLS_PAD_NONE (0<<3)
107 #define BLS_PAD_ISO9797M1 (1<<3)
108 #define BLS_PAD_ISO9797M2 (2<<3)
109 #define BLS_PAD_PKCS1_1o5 (3<<3)
110 #define BLS_PAD_PSS BLS_PAD_ISO9797M1
111 #define BLS_PAD_PKCS5 BLS_PAD_PKCS1_1o5
116 #define BLS_MASK_CHAIN (3<<6)
117 #define BLS_CHAIN_ECB (0<<6)
118 #define BLS_CHAIN_CBC (1<<6)
123 #define BLS_MASK_RND (3<<8)
124 #define BLS_RND_PRNG (1<<8)
125 #define BLS_RND_TRNG (2<<8)
126 #define BLS_RND_RFC6979 (3<<8)
131 #define BLS_MASK_ECDH (3<<10)
132 #define BLS_ECDH_POINT (1<<10)
133 #define BLS_ECDH_X (2<<10)
134 #define BLS_ECDH_HASHED (3<<10)
139 #define BLS_DISCARD (1<<12)
144 #define BLS_MASK_AES_CHAIN (3<<13)
145 #define BLS_AES_CHAIN_CTR (1<<13)
146 #define BLS_AES_CHAIN_CFB (2<<13)
147 #define BLS_AES_CHAIN_OFB (3<<13)
166 typedef enum bls_md_e bls_md_t;
168 #define BLS_RIPEMD160_SIZE 20
169 #define BLS_SHA256_SIZE 32
170 #define BLS_SHA512_SIZE 64
172 #define BLS_HASH_MAX_BLOCK_COUNT 65535
186 #define BLS_DES_BLOCK_SIZE 8
194 #define BLS_AES_BLOCK_SIZE 16
217 uint8_t *publicExponent;
218 uint32_t publicExponentSize;
220 uint32_t modulusSize;
221 uint8_t *privateExponent;
222 uint32_t privateExponentSize;
239 typedef enum bls_curve_e bls_curve_t;
247 #define BLS_CRC16_INIT 0xFFFF
250 #endif //__BOLOS_CRYPTO_COMMON_H__
Definition: bolos_crypto_common.h:216
Definition: bolos_crypto_common.h:202