| 3003 | } |
| 3004 | |
| 3005 | static void random_fe_non_zero(secp256k1_fe *nz) { |
| 3006 | int tries = 10; |
| 3007 | while (--tries >= 0) { |
| 3008 | random_fe(nz); |
| 3009 | secp256k1_fe_normalize(nz); |
| 3010 | if (!secp256k1_fe_is_zero(nz)) { |
| 3011 | break; |
| 3012 | } |
| 3013 | } |
| 3014 | /* Infinitesimal probability of spurious failure here */ |
| 3015 | CHECK(tries >= 0); |
| 3016 | } |
| 3017 | |
| 3018 | static void random_fe_non_square(secp256k1_fe *ns) { |
| 3019 | secp256k1_fe r; |
no test coverage detected