GSoC 2012

GSoC 2012 Logo

Hello, World!

I was selected this year to be a part of JRuby, and contribute as part of Google Summer of Code 2012.

Over the summer, I will try to add features to krypt and hopefully digital signature support, with an exited mentor Martin Bosslet. He’s over from Germany and is pretty much interested in security.

The deal is open-ended with me trying to complete as many features for Digital Signatures and then move on for more powerful features, with the likes of touching nokogiri{xml},  and pdf support. If possible try on an adventure with Martin’s idea of Signing Ruby gems .Whoa, thats a hell lot!

Over the short period of three months, which overlap my exams, I will try to implement as much possible to make most of GSoC. Currently I am undergoing the Community bonding period, where I am getting to know more about krypt, JCE, Digital Signatures, etc. As a start I tried porting RIPEMD-160 , and did other tests, to get me going.

This is going to be a super awesome summer!

GSoC Selected Meme


Week one :grit

We tried to read and understand parts of grit
RDoc can be found here:

As it seems, its doesn’t encompass all of git’s functionality, but is infact just a wrapper over git
What it essentially does is, give us a OO wrapper over all Git’s objects,and access to change or retrieve data from them, which
is what was desired in the first place

So to move forward, we came up with two ways
1. Create a solution on top of grit { Useful and easy for now, also makes sense to not disturb what grit does}
2. Create an integrated solution as part of grit {would be useful later}

We are going ahead with [1]

Examples for creating a commit
require ‘../lib/grit’

count = 1
Dir.chdir(“/home/sward/project/testrepo”) do
r =‘.’)
while(count < 1) do
fname = + count.to_s, 'w') { |f| f.write('hellor ' + fname) }
count += 1

r.commit_index('my commit')


To read data and other info we would just need the handle to Repo object, which encompasses
all of git's other objects which are essentially these


From rubyforge you can find important objects we are interested, some being Commit, Merge, Repo, Git, etc

But for us to torrent we are interested in Blob object which contains dumps of data from file and doesnt always match
the data to a unique file, meaning if there were to be two files with same data,only a single blob would be created as the
hash of both would be same.

blob gives us data that we could piece and then torrent, as with the state of the git database, we are yet to confirm how to approach that as well.

[1] Send out a pretty good hash containing all of gits object we may read from grit
[2] Send the .git repo's files we are interested in wrapped together.

[2] one being more easy but [1] being logical for us to do now.

Along the same time, I happened to look over at ruby-torrent

Previously we were under the impression that this would host a tracker solution as well. It appears its just a client in ruby. Similarly librubytorrent also doesnt help in case of a tracker.

There were other project attempting this, which were but Rails and sinatra

This one was of particular interest

So we will be going ahead with the last solution and start studying is this week.

Synopsis -Blunt


Relevant mathematics associated with the Project:

1. Let S be a system defined for the overview of git-torrent system

S={GR,GR’,T,D,C,E,Files | Фs }


GR = Git Repository

GR’= Changed Final Git Repository


D= Diff Architecture

C=Choice Architecture

Files is a set of Files in any directory structure

E= Exceptions

Фs= Rules

Is= GR’ ={Ф}, δ(GR) {Changes over GR}

T{ф} , s∩T≠ {ф}

Fs= GR’ C GR , GR’ C δ(GR) , p=s


δ= changes done

p= peer

s= seed

f(GR,D,T,C | G ε T) ->f(GR, δ(GR)) -> GR’

t(GR) => diff(GR)
lim GR → CO

dif(files) → GR w.r.t. CO


g Є GR


, g' Є GR' 








|) GR' 


=> Files



Input = {GR,GR’,T,D,C}

Output = {GR’,T’}


2. Let GR be a System defined for Git Repository

GR = {CO,REV, REF,t,A,L,Files,Ws | t εTREE}


CO= Commit Object

REV= Revision

REF= Reference



Ws= window size for break up

m(t,CO,A)-> t’

trans(t, REF, REV)->(REF’->t’)

size(Files) > Ws

{Refs} subset of CO
dif(files), lim files -> CO -> Ws

Output :
wsCO =files , dif(GR,GR')=CO'







3. Let T be a system over Torrent

T={P,S,TRAC,OM,PWP,THP,CON,gi,d ,t | d ε D , gi ε GI,t ε Tree}




TRAC= Tracker

CON= Connectivity

GI= Git Interface

S is proper subset of P
|s| lim→|co| 
f(P,t) → S
f(Pc',t) → P'
Pc'=(P ^ δ(P')) OR δ(P') => (GR')
f(Pc',GR') => Gr



dif(con') , where con' is subset of S
for lim S → Pcon(S)=GR'
f(tree,P) → Pl'=S

4. Let D be the diff architecture,

D={CO, CO’,CM,LOG,gi | gi ε GI}


CO=Commit Object

CO’= Changes over CO

CM=Context Mapping


dif(CO) → CO’ for lim CO‘ ->0

CO’={cod,0| cod is proper subset of CO}


5. C define the Choice architecture used to determine, which of the seeds to use in a swarm.

C={Sc, GR’, d, Sc’,TRAC |d ε D}

Sc=Set of choose Seeds




6. Let CO be a system for Commit Object Management

CO={Delta,State,HASH,Data,d,a,log | a ε A, log ε LOG, d ε D}




data is subset of files
Is-> state = committed a≠{ф}
delta:d {onto, one-to-one , one-to-many relation} 
dif(data)=delta for lim delta → 0
f(CO') → log *changed CO → for delta


7. Let REF be the reference model,

REF={sw,t,Tspec, Tsw, Tsw’ , Sw’,spec | t ε T, Tsw’ is subset of tree}


sw= Switch

Spec= Specification

f(sw ,sw’,Tsw)->Tsw’

f(sw’ ,Tspec)->Tsw’(TSPEC)

f(Spec,sw )->sw’

Tsw= Current Tree

Tsw’= Switched Tree

8. Let REV be for Revisioning

REV={sn,t,n | t ε Tree, sn ε SN}


sn=Snapshot of project



Tsn=Snapshot Tree

generating of RC and releases 
added a here
Exception condition here - > R(Sn


) → n




Same versionsnapshotting, Ignore this to let n


be as it is.


9. Let A be used for Authentication

A={SSH, gr, At, User | SSH(user), gr ε GR}

f(gr, SSH)->gr’


ND for invalid user of A


10. LOG={u,gr,co,l ,GR’ ,l’| u ε user, gr ε GR,co ε CO, l ε LOG}


 l = ∑ l

i i=0

l'=f() U l, f and l increase monotonically


10. Let P be a set for Peer Functionality






and S≠{ф}


Fs = L’ -> S

11.THP define the Tracker HTTP Protocol working

THP={TRAC,m,pl,ml,u }




pl=Peer List

ml= Mask List

and pl≠{ф}






12. Peer Wire Protocol is given by

PWP={gr,pl,ll,sl,m | gr ε GR,}


sl=Seed List

ll=Leech List



sl is proper subset of pl
PWP →∫ m = u

Problem statement feasibility assessment using satisfiability analysis and NP Hard, NP Complete or P type using modern algebra:

We will be considering Section 6, to prove our problem to be NP-Complete.
1. The Problem is NP- 
This one states we have an NP problem, verification of required data from Se' is possible in O(n


) {k=constant} time. 
Derivation of Se' cannot be done as such in O(n


As such the Problem in in NP

2.We know that the Vertex- Cover{VC} Problem is NP-HARD
Using vertex – cover anology here,
we need to find Se'(cover) from Se(Graph G) that gives reachability (GR').
Thus, V-C is sub module call for this function {∏}.

 Thus we can say,> V-C Problem

but V-C is NP-HARD.

Thus ∏ , being harder than it, also falls into NP-HARD.for Se' is Turing complete, and Turing computable .
This can be verified in O(n)
Thus, as ∏ is in NP and NP-HARD, it is a NP complete problem .

Now , ∏ is a submodule call from the main S system.
S >

Thus our system can be stated to be NP-complete

Verification of this is linear , but derivation is not.

DNA Coverage

This news ran today[13-09-2011]

Lighting the innovation lamp in enterprising young minds

Rajesh Rao

At the Uniken Innovation lecture series 2011, organised recently in the city, three best innovative ideas were selected out of 28 presentations given by students of city institutes and entrepreneurs. The day-long lecture series was organised by Uniken in association with Shantanurao Kirloskar Chair (University of Pune), College of Engineering Pune (COEP) and Centre for Innovation, Incubation and Entrepreneurship (CIIE) IIM-Ahmedabad, on September 8 at COEP campus in the city. World-renowned American cryptographer and one of the pioneers of public-key cryptography, Whitfield Diffie, motivated students with his talks at an interactive session conducted at the end of the event. Chief innovation officer and CEO of Uniken, Sanjay Deshpande, was also present on the occasion. “Education in India is more about understanding the mechanics of examination, rather than real application of knowledge. For innovation to happen on campus, we have to bring the concept of freedom in academics,” said Deshpande. The lecture series, based on the theme ‘students as innovators’, was organised to encourage students to become innovators and entrepreneurs. Students from city institutes and entrepreneurs were invited to present and showcase their innovative ideas, final year projects and ready-to-market products. Out of the 28 presentations that were showcased, three best innovative ideas were selected. Projects of teams of final year students, Abhijit Navale and Nikhil Bhagwat (JSPM’s Jayawantrao Sawant College of Engineering) and Puneet Sutar, Vipul Amler, Prajakta Tambe, Neeraj Thakur (Pune Institute of Computer Technology) along with city-based entrepreneur Koustubh Yadre, were selected as the top three winners. A technology innovation, product design and engineering firm, Uniken is headquartered in Florida (US), with its innovation centre in Pune. Uniken has partnered with CIIE (IIM-Ahmedabad) to set up a national innovation network across the campuses in India. Internet security expert, Whitfield Diffie, is on the scientific advisory board of Uniken. The three best innovative ideas: Abhijit Navale and Nikhil Bhagwat (Final year students of electronic and telecommunication) Their project helps paralysed people to communicate with others using infra-red (IR) sensors installed on a goggle to detect facial muscle movements of the patient. The IR sensors send signals to a microcontroller, which uses the basic concept of interrupt generation to make words. A cost-effective and easy-to-operate mode for paralysed people to communicate, it does not require any touch interface. Puneet Sutar, Vipul Amler, Prajakta Tambe, Neeraj Thakur (Final year students of computer science) They have created Git-Torrent distributed version control system, which provides re-visioning that keeps track of the history of all changes done to a file. Targeted towards large data producers such as animation industry, the system uses Git-Torrent to help them work easily in remote locations. The innovative idea envisages providing a solution for re-visioning large data. Koustubh Yadre (Entrepreneur) As an alternative to disposing household wet garbage, he has designed a portable compost tumbler. Adding daily waste in the tumbler along with a waste binder turns the waste into compost within 15 days, which can be used for gardening. All types of bio-degradable material like food and vegetable remains, fruit peels, flowers and garden waste can be used. The specially designed tumbler is UV resistant and thermo controlled drum. The compost culture used are beneficial fungus and bacteria. The tumbler also helps in keeping the waste free from rodents, bad odour and flies.

One more news coverage was a day before, on page 4 DNA Pune, news: American Expert…

External Links:


Page 5.


Page 4.

Kernel Compilation

Should have put this looooooooong before, but better late then never, so this one’s for all you BE people

Don’t mind the wordings, this is just a dump of my notes and outputs.

Step 1: Get kernel stable source code from will get an archive  name something like linux-x.y.z.tar.bz2. here x indicates version no, y indicates whether kernel is stable or not and  z indicates kernel release number.if y is even then kernel is stable  otherwise unstable.we can download using command


Step 2: untar a kernel archive in /usr/src(not necessarily) using

#tar -xjvf linux-2.6.25.tar.bz2 -C /usr/src then go to directory where u have untarred the file cd /usr/src

Step 3: Check whether you have gcc or not: You can check it by following shell command which gcc if gcc is not installed,u can get it using command sudo apt-get install gcc

Step 4: Now you can start kernel configuring by typing any one of the command:

make menuconfig – Text based color menus,  radiolists & dialogs.  This option also useful on remote server if you wanna compile kernel  remotely.

make xconfig – X windows (Qt) based configuration tool,  works best under KDE desktop make gconfig – X windows (Gtk) based configuration tool,  works best under Gnome Dekstop.

For example make menuconfig command launches following screen:make menuconfig

You have to select different options as per your need.  Each configuration option has HELP button associated with it  so select help button to get help. finally select save an alternate configuration as .config file and exit.

Step 5: ~Modules Start compiling to create a compressed kernel image,

enter: make

Start compiling to kernel modules: make modules

Install kernel modules: make modules_install

Step 6 : ~Install kernel So far we have compiled kernel and installed kernel modules.  It is time to install kernel itself. make install

Step 7: Create an initrd image After this you will have to create initrd image of kernel. This can be done as follows : first goto /boot directory cd /boot create initrd image:

mkinitrd -o initrd.img-

Many linux distros does not support this naturally,like Debian Wheezy does not suppport mkinitrd tools and so we have to use initramfs tools.

You can simply type following commands for this case: update-initramfs -k -c and then update grub update-grub

Step 8:

This step includes actually modifying grub. This can be done by actually modifying  file grub.conf or using command update-grub

Step 9: reboot

Reboot from your new kernel.U can find out ur kernel version using: uname -a #Mine gave this sward@sward:~/module/hello_dev

$ uname -a Linux sward #5 SMP Thu Apr 14 00:19:30 IST 2011 i686 GNU/Linux

Workshops Follow-up

Today I met a professor from SKN, where I had presented and held workshops three time till now. She reminded me for more.

It also brings me back to posting here, reports of 2 workshops I had taken back in Impetus and Concepts,well basically~4

These were~
1. Blender ~ Chamba Chapter
This was a two day workshop on Blender, with a Film -Fest and an introduction to the Chamba Open Source Movie Project. It was fun! I started off as usual, and made the (trademarked, :-P) table modelling and other blender stuff.
There was good interaction with the crowd, it was a good experience to have people from college that were out of city, and mingle with them over the two days..Labeeb had joined me for the same.

2. Introduction to Indic Computing and Silpa Project “;

Here I and Praveen just dropped in at the end, my friends Nikhil, Prajakta, Smriti had learned localization over weeks, and were guided by Santosh T(who’s a member of the Wikimedia Languauges Committee)
There were some question regarding JSON and Silpa in general which we tried to answer

3. InstallFest-
Well cant call this a workshop, but had set a days stall with good support from my juniors which hosted Chamba as a stall, and GNU/Linux InstallFest, we had laid cool stickers, and other stuff to roll out for free..

This was my one day attempt to teach the crowd, setting up the environment for Android(2.3/3.0).,moving around with the Architecture and the basics of Development.
I started off with a presentation, gave an overview of Android, moved across its environment, the command line, managing dvm, dvm debugger, and browsed through the various data over the Android image from command line.
Then I introduced image management.

I then moved to Resources and other contents of an Android project. Introduced with main.xml and actual coding of Activity.

I started coding a simple hello world application and then a converter(First steps first)

All in all, I tried completing:
1. Activity
2. Services
3. Intents
4. SQLite Database Access
5. Showed creating Alarms

To round up I showed the creation of a NotePad and a Twitter App in Android.

It was a good experience to teach such a technology for the first time(which was not just Linux i mean!)

–More to come~other workshop and seminar experiences–


Yesterday, we(Shyam Sir, Anand-his brother an me), completed the setup of a test cloud in PICT.

We setup a cloud with procedure from below;

It was a havoc for many days, Shyam Sir had started the setup many days before. Its easy to setup the cloud, if its on an internal network. We had many collisions as we wanted to use two NIC’s one for Public IP and another a private one that created a bridge to the internal nodes.

We setup Eucalyptus EC,which provides Infrastructure as a Service (IaaS), which consists of the following main components

1. Cloud Controller (Your main interface for the external world)
2. Cluster Controller (CLC-Controls the internal cluster/s)
3. Walrus (Controls volumes and storage)
4. SC (Storage Controller)

Every node within the network should have a Node Controller(NC)

Important things to remember:
1.Make sure you have assigned proper IP’s for internal and external network
2. Make sure there is password less login from CC to NC
3. ssh is a hell,it wasted our days, make sure ssh ports are properly configured, this is bound to happen due to use of 2 NIC’s
4. Make sure you have set ListenAddress property,to mask and use the desired interface for ssh,(/etc/ssh/ssh_config)
5. See that all internal interfaces act as a bridge, along with ip-forwarding enabled.

*For detailed error,check the cc.log in /var/log/eucalyptus

*Only after proper registration of nodes, do we find a nc.log on the node machine, this is an indication of relief(its almost done), as your CC and NC are communicating.

—More to come about images installation and management—