| 90 | } |
| 91 | |
| 92 | bool per_commit_secret(const struct sha256 *shaseed, |
| 93 | struct secret *commit_secret, |
| 94 | u64 per_commit_index) |
| 95 | { |
| 96 | struct sha256 s; |
| 97 | |
| 98 | if (per_commit_index >= (1ULL << SHACHAIN_BITS)) |
| 99 | return false; |
| 100 | |
| 101 | shachain_from_seed(shaseed, shachain_index(per_commit_index), &s); |
| 102 | |
| 103 | CROSS_TYPE_ASSIGNMENT(commit_secret, &s); |
| 104 | return true; |
| 105 | } |
| 106 | |
| 107 | bool per_commit_point(const struct sha256 *shaseed, |
| 108 | struct pubkey *commit_point, |
no test coverage detected