diff options
Diffstat (limited to 'lib/lib6.h')
| -rw-r--r-- | lib/lib6.h | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -6,6 +6,25 @@ #include "lib3.h" #include "lib2.h" #include "lib.h" +#include "util/doublelinkedlist.h" + + +struct bb_attack { + BIGNUM *_2a; + BIGNUM *B; + BIGNUM *_2B; + BIGNUM *_3B; + BIGNUM *one; + BIGNUM *two; + BIGNUM *three; + BIGNUM *c_0; +}; + +struct interval { + BIGNUM *lower; + BIGNUM *upper; + struct list list; +}; struct dsa_public_params { @@ -43,4 +62,15 @@ void dsa_recover_k_from_repeated_nonce(BIGNUM *mess1_hash, BIGNUM *mess2_hash, void dsa_generate_magic_signature(struct dsa_public_params *pub, struct dsa_per_user_param *priv, BIGNUM *mess_hash); int rsa_parity_orcale(BIGNUM *message, struct rsa_key_bignum *private); +void pkcs1_5_padding(char *message, char *result, unsigned int target_length_byte); +int bleichenbacher_prepare(BIGNUM *c_0, struct rsa_key_bignum *public, struct bb_attack *b); +int bleichenbacher_step_2a(BIGNUM *s_i, struct rsa_key_bignum *public, + struct rsa_key_bignum *private, struct bb_attack *b); +int bleichenbacher_step_2c(struct interval *m, BIGNUM *s_i, struct rsa_key_bignum *public, + struct rsa_key_bignum *privat, struct bb_attack *b); +//int bleichenbacher_step_3(BIGNUM *s_i, set_t *m_i1); +int iv_merge2(struct interval *left, struct interval *right); +int iv_merge3(struct interval *left, struct interval *middle, struct interval *rigth); +int iv_list_insert(struct interval *iv, struct list *list); +void iv_printf(struct interval *e1); #endif /* __LIB_6_H__ */ |
