Tuesday, July 19, 2005

USB Wireless working

Got a USB Wireless LAN stick. No Linux drivers as usual.

A bit of googling revelead that it is indeed supported. Downloaded drivers, downloaded kernel source, installed firmware. Compiled drivers and installed them, voila , the drive was up and ready.

KWifiManager providing the works in graphics departement.

enthusiastic

Enthusiasm (from Gr. enthousiasmos possession by a god) originally means inspiration by a divine afflatus or by the presence of a god. Today it simply means intense enjoyment, interest or approval.

Originally an enthusiast is a person possessed by a god. Applied by the Greeks to manifestations of divine possession, by Apollo, as in the case of the Pythia, or by Dionysus, as in the case of the Bacchantes and Maenads, the term enthusiasm was also used in a transferred or figurative sense.

Friday, July 08, 2005

Jive messenger up and running

Finally set up a Jabber server on a "majboot" server in the lab. Hopefully this will make the lab sessions more bearable.

Have to still find a decent console based jabber client though. Centericq and cabber had problems. Couple a good client and elinks, enough to keep me busy in console mode :)

Sunday, July 03, 2005

Converting strings to ints

The problem is to convert the random string data obtained from os.urandom() in Python to an integer.
os.urandom() returns specified number of bytes of random data. This data is to be interpreted as an integer, because we need large 512 bit or above random prime numbers to generate keys in RSA.

Python being a high level language, one cannot just typecast a pointer.

Well after googling and popping the question at PLUG meeting, the conlusion was that there is no inbuilt function that just interprets the returned bytes as ints.

So here is the function:

def getint(randomstring):

exp = len(randomstring) - 1
sum = 0

for a in randomstring:
sum = sum + ord(a) * 256 ** exp
exp = exp - 1
return sum

Python gives unlimited precision with longs.