2

# Unable to compute factors p and q from exponent d.

Package:

cryptography

4288

Exception Class:

ValueError

## Raise code

```
p = gcd(cand + 1, n)
spotted = True
break
k *= 2
# This value was not any good... let's try another!
a += 2
if not spotted:
raise ValueError("Unable to compute factors p and q from exponent d.")
# Found !
q, r = divmod(n, p)
assert r == 0
p, q = sorted((p, q), reverse=True)
return (p, q)
```

## Links to the raise (1)

https://github.com/pyca/cryptography/blob/7bb03065237d9a16477e2d94734638aa8f8ba692/src/cryptography/hazmat/primitives/asymmetric/rsa.py#L312NO FIXES YET

Just press the button and we will add solution

to this exception as soon as possible

* As many users press the button, the faster we create a fix

### Add a possible fix

Please authorize to post fix