# Thread: RSA/DSA problem calculating X^(-1)

1. ## RSA/DSA problem calculating X^(-1)

Hello everybody !

Can someone please help me. Both RSA and DSA use an calculation in the form of X^(-1), where X is an integer and the result is an integer too.

But as far as I know, X^(-1) is the same as 1/(X^1) and the result is a real and not an integer.

ex. 2^(-2) = 1/(2^2) = 0.25
ex. 10^(-1) = 1/(10^1) = 0.1

Thank you for any help. 2. Hi there, from what I learned on RSA, they do not use integers they use BIG number which is a data type especially for the use of large number.
I don't know what calculations you are talking about exactly, there are millions of things you can do with RSA/DSA.

I guess what I'm asking is for you to give some more info on what calculation you are trying to achieve and for what.

goatass 3. Hello goatass !

To be more specified, in RSA, the private exponent D is calculated D=E^(-1) mod ((P-1)*(Q-1)).

In DSA it's S=(K^(-1)*(SHA(M)+X*R) mod Q and W=S^(-1) mod Q.

I know that a "BigNum" is a kind of integer, at least it is no real data type.

The D from RSA can be calculated by using some tools (like RSA-Tool 2 by tE!), but in DSA you have to do those calculations everytime you want to sign a message or verify it. 4. Read again the definitions, RSA and DSA are
based on *modular* arithmetics, therefore
modular inverses are always integers. In short,
r is the inverse of m modulo n if there exist a
integer k such that k.n + 1 = m.r, which you
can solve (when possible) with for instance
the extended euclidean algorithm. 5. Hi,
look at http://indigo.ie/~mscott/
There are some DSA/RSA examples in this lib.

Bye, 6. Hello everybody !

Thank you all for your help!  #### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•