Learning RSA with Java?

Hi everybody,

This is my first message on this forum. I'm 22 and starting Computer Science at UFRJ - Rio de Janeiro, Brazil. Well, I'm not so good with English, but I'll try...

What I'd like to know by now is the following:

At the university we're learning Number Theory and RSA. Since I know that Java already has all the infrastructure to support this method I ask: is there anything useful I could do with Java for training my skills on it?

I don't think re-implementation of RSA as a good idea, so... sugegtions?

Also I was thinking about using Delphi or Ruby instead. What about Ruby :) ?

Message was edited by:

renatosilva

[685 byte] By [renatosilvaa] at [2007-10-3 4:23:26]
# 1

> is there anything useful I could do with Java for training my skills on it?

Many cryptographic providers (CSP's) have implemented RSA as an asymmetric cryptography algorithm often used for digital signatures, envelopes, etc. If you meant to train your skills in an mathematical way, visit http://www.rsasecurity.com and many other sites where you can learn RSA basis. In Java you can just 'use' RSA...

I'm sorry if I misunderstood you.

Regards.

djalfirevica at 2007-7-14 22:25:45 > top of Java-index,Security,Cryptography...
# 2

That's it.

I don't think it's suitable that I learn and undestand RSA but don't become to implement it. I know it's good as a mathematic base anyway, but i want to give all that the most pragmatic focus as possible.

What you've said is my issue: "in Java you can just use..."

Do you know whether Ruby has an implementation of it?

renatosilvaa at 2007-7-14 22:25:45 > top of Java-index,Security,Cryptography...
# 3
I don't know for sure, but try typing 'RSA implementation in Ruby' in Goooooogle and there are some interesting links...By the results, I'd say yes it's implemented in Ruby.Regards.Message was edited by: djalfirevic
djalfirevica at 2007-7-14 22:25:45 > top of Java-index,Security,Cryptography...
# 4
Yeah I've "googled" it.Someone told me that it's possible to use RSA in Ruby using openssl bindings, whatever it means...I guess I'll forget all about RSA, just pass the matterThanks ;)
renatosilvaa at 2007-7-14 22:25:45 > top of Java-index,Security,Cryptography...
# 5

Actually, I think java is an excellent language to learn RSA and other problems from number theory. Java's BigInteger class is extremely easy to learn and use, contains most of the elementary number theory primitives like GCD, modular exponentiation, modular inverse, and division with remainder. It doesn't have extended GCD, but programming this up is a good exercise anyway.

ghstarka at 2007-7-14 22:25:45 > top of Java-index,Security,Cryptography...
# 6
Why there's no MutableBigInteger in java? This could make some simple algs faster and easier to implement.
Maaartina at 2007-7-14 22:25:45 > top of Java-index,Security,Cryptography...
# 7
Faster, yes. Easier, I don't think so.
ghstarka at 2007-7-14 22:25:45 > top of Java-index,Security,Cryptography...
# 8
Good point that of Maaartin...
renatosilvaa at 2007-7-14 22:25:45 > top of Java-index,Security,Cryptography...
# 9
> Good point that of Maaartin...I can live without a MutableBigInteger. All the RSA, DSA and Shamir's N from M I have experimented with have worked very well using BigInteger. If I had used a MutableBigInteger I would have spent a lot of time cloning values.
sabre150a at 2007-7-14 22:25:45 > top of Java-index,Security,Cryptography...
# 10

Probably is BigInteger better than MutableBigInteger. But surely is having both even better. RSA and DSA uses a lot of multiplications, so you can hardle make use of an efficient "+=" possible with MutableBigInteger (there is no such advantage with "*="). If doing things like a = b - c + d + e, then you could make a good use of MutableBigInteger.

Btw., did you have a look at my SecretSharing class in the meantime?

Maaartina at 2007-7-14 22:25:45 > top of Java-index,Security,Cryptography...
# 11

> Probably is BigInteger better than MutableBigInteger.

> But surely is having both even better. RSA and DSA

> uses a lot of multiplications, so you can hardle make

> use of an efficient "+=" possible with

> MutableBigInteger (there is no such advantage with

> "*="). If doing things like a = b - c + d + e, then

> you could make a good use of MutableBigInteger.

:-) I suspect we will have to agree to differ!

>

> Btw., did you have a look at my SecretSharing class

> in the meantime?

Yes I did - very nice - I played with it for an hour or so and I have bookmarked it for future reference.

sabre150a at 2007-7-14 22:25:45 > top of Java-index,Security,Cryptography...