ref: 3a40210df86c6424d2eaf8123f4b2d352c73f077
parent: bdaa0022550a319c42de5f019d22a40625845182
author: cinap_lenrek <[email protected]>
date: Tue Dec 1 04:40:24 EST 2015
libsec: fix genprime() to produce normalized result this fixed bug "assert_failed_m-flags__mpnorm_since_283cc2200e34".
--- a/sys/src/libsec/port/genprime.c
+++ b/sys/src/libsec/port/genprime.c
@@ -17,6 +17,7 @@
p->p[p->top-1] &= (x-1);
p->p[p->top-1] |= x;
p->p[0] |= 1;
+ mpnorm(p);
// keep icrementing till it looks prime
for(;;){