| 5 | #include <common/utils.h> |
| 6 | |
| 7 | void blinding_hash_e_and_ss(const struct pubkey *e, |
| 8 | const struct secret *ss, |
| 9 | struct sha256 *sha) |
| 10 | { |
| 11 | u8 der[PUBKEY_CMPR_LEN]; |
| 12 | struct sha256_ctx shactx; |
| 13 | |
| 14 | pubkey_to_der(der, e); |
| 15 | sha256_init(&shactx); |
| 16 | sha256_update(&shactx, der, sizeof(der)); |
| 17 | sha256_update(&shactx, ss->data, sizeof(ss->data)); |
| 18 | sha256_done(&shactx, sha); |
| 19 | } |
| 20 | |
| 21 | /* E(i+1) = H(E(i) || ss(i)) * E(i) */ |
| 22 | bool blinding_next_pubkey(const struct pubkey *pk, |
no test coverage detected