Posts

Showing posts from September, 2011

A bit more RSA

I really don't like when I do not understand anyone's code, so it takes me a bit of effort till I do my own homework to create my own version of things I can understand. Being a teacher, I always find troubling not to be able to explain things to my students, so I used some time to create my very own RSA implementation. I've found a very good reference text here . My perl program takes three parameters data, encryption (or decryption) exponent and module and it returns the encrypted (or decrypted) version. As it uses BigInt library it should be happy dealing with any of your big numbers. You can find a Java implementation in the above mentioned text too. #!/usr/bin/perl use Math::BigInt; if($#ARGV<2) {print "Usage: exp, module\n"; exit 2;} $a = Math::BigInt->new($ARGV[0]); $b = Math::BigInt->new($ARGV[1]); $c = Math::BigInt->new($ARGV[2]); print "out=".($dec = $a->bmodpow($b,$c))."\n"; Contrary to what may look, bmodp

Playing with RSA

A recent assignment required me to dust off my knowledge of RSA (public-key encryption algorithm). While it is something I do teach every year, I usually do not have to fiddle with the code. So when I was needing a pair of keys (public+private) for some test I needed to look around for some   key-generation code . Once I've got my pair of keys I was surprised with this implementation of RSA encryption in perl: #!/bin/perl -sp0777i However, the fastest way to get you working is using OpenSSL's genrsa command.

Remote Desktop is gone

Image
Last year I bought a small notebook to keep me updated of what was available in Windows 7. Being a small computer, using it for a long session and, in particular the mouse pad, is not very pleasant. So while I am not on the go, I rather would prefer to access this computer remotely to use my desktop's bigger screen and more comfortable mouse. I was shocked when I learned that Microsoft had "streamlined" some versions of Windows 7 so some features were missing for some of them. I later learned that Windows 7 Home Premium does not include the Remote Desktop server that was common in Windows XP. I occasionally use remote control tools like TeamViewer with great success (or other variants of VNC) but the main problem is they do not work as smoothly as Remote Desktop Protocol ( RDP ) nor they allow you to resize the desktop area at log-on time. One colleague of mine mentioned, while I was complaining about the missing Remote Desktop on my notebook, that there was a ha