Other

Application Layer Protocol Support in IoT Cloud Platforms

I recently wrote a seminar paper for Aalto uni’s course and decided to publish it here online, since it might provide some useful insight on application level protocol support on IoT cloud platforms. Please keep in mind that I had limited time and resources while conducting this seminar paper. I think there should be much more elaboration on each section. But anywaays, here it is:

Application Layer Protocol Support in
IoT Cloud Platforms

Abstract
The growth of interconnected devices, known as the Internet of Things, provide new type of opportunities and solutions for different industries and consumer products. However, the number of and heterogeneity of devices, the diversity of communication protocols, and security are some of the major challenges the IoT industry faces. Many cloud-cased platforms provide solutions for IoT and aim to address these challenges through different approaches. This paper provides useful overview of different key elements of the subject of IoT. We survey the different layers of the IoT stack and the discuss the network protocols used in IoT today . We also provide a comparison of popular IoT cloud platforms such as Microsoft Azure, Amazon Web Services and Google Cloud Platform. The comparison shows varying support for the selected application layer messaging protocols. The results conclude that Microsoft Azure provides the most comprehensive support for application layer protocols, supporting natively protocols such as AMQP, MQTT and HTTP. In addition, Azure provides both cloud framework and field gateway SDK for extending the protocol support.

(lisää…)

Älykkyys ja älypelit (in finnish)

Selailin vanhoja koulutehtäviäni hiljattain ja löysin kurssille tekemäni tutkimussuunnitelman. Vaikka se sisältää hiukan asiavirheitä tuttuputtuja kirjoitusvirheitä ja hiukan epäakateemista kirjoittamista, päätin sen nyt tänne jakaa, sillä lyösin itse siitä joitain mielenkiintoisia pointtereita. Toivottavasti jollekkin on hyötyä. Liitin osuuteen vain teoriaosan, koska loput tekstistä käsittelivät vain kuvitteelisen tutkimuksen tekemistä (tutkimuksessa oltaisiin tutkittu lumosity älykkyyspelin vaikutuksia älykkyyteen):

1 Johdanto

Olen aina ollut kiinnostunut ihmisistä. Tutkimussuunnitelmaa miettiessäni minulle tuli heti mieleeni, että haluaisin tutkia asiaa, jossa psykologia ja informaatioteknologia yhdistyvät. Päädyin pohtimaan pelien vaikutusta ihmiseen.

Lukion alussa psykologian ensimmäisellä kurssilla tein pienimuotoisen tutkimuksen, jossa pelasin silloisella nokia puhelimellani Brain games nimistä peliä. Tutkimuksen alussa tein internetistä löydetyllä testillä älykkyystestin, jonka toistin tutkimuksen lopussa. Pelasin peliä säännöllisesti ja kuukauden aikana pelikertoja kertyi runsas sata. Lopuksi sain kasaan tutkimustulokset. Älykkyys oli huimasti kasvanut.

(lisää…)

RSA encryption, private and public key calculation

RSA is a cryptosystem and used in secure data transmission. It is based on the difficulty of factoring the product of two large prime numbers.

If we already have calculated the private ”d” and the public key ”e” and a public modulus ”n”, we can jump forward to encrypting and decrypting messages (if you haven’t calculated them, please scroll downfurther this blog post).
Encryption
To encrypt a message one needs a public key ”e” and ”n”, which we take a look on how to calculate further, and a message ”m”.

Equation for encrypting the message
m^e mod n = c
”c” is the ciphertext, an result of encryption using cypher algorithm, such as the encryption algorithm demonstrated.

Decryption
To decrypt the message, one needs the ciphertext created ”c”, the public modulus ”n” and the own private key.

Equation to decrypt the message
c^d mod n = m
The equation results in message which was previously encrypted.

Example
Let’s assume that we have successfully generated the numbers e, d and n. If Alice would want to send Jack a message, she would need to know Jacks public key, which can be publicly available.
Alice is sending a message to Jack m = 42
(m is integer representation of the actual message, could be anything like ”hello world”. How the conversion is done, is up to other algorithm)
Jacks public key consist of number e = 17 and n = 3233.
Alice uses the encryption equation to encrypt the message:
m^e mod n = c
42^17 mod 3233 = 2557

Now Alice has the message encrypted with Jacks public key.
Alice send the ”c”, ciphertext to Jack.

Jack receives the message. He has private key ”d” = 2753. He uses it and public key component n to decrypt the message:
c^d mod n = m
2557^2753 mod 3233 = 42

Jack has successfully decrypted the message 42!

How to choose the e, d, n???
Here is the step by step explanation on how to calculate the private and the public key components.

1. Choose two very large prime numbers which are distinct from one another. Calculate the RSA modulus by multiplying them.
– For demonstration purposes I am going to use small numbers. Why to choose large prime numbers is explained pretty well in this stack overflow answer.

Our primes: p = 11, q = 5
RSA Modulus: n = 11*5 = 55

2. Calculate the phi φ (Euler’s totient function)
Euler’s totient function:
φ(n) = (p-1)(q-1)
φ(n) = (11-1) * (5-1) = 10*4 = 40

3. Select, e, that is relatively prime to the φ and is 1 < e < φ
A prime is relatively prime to some number, if they do not have any common divisor expect for 1. For checking that a number is relative to your φ, you can use Euclidean algorithm or just use your brains (:D I know. check this out http://easymathsteps.jimdo.com/number-system/relatively-prime-number/).
For number 40, our phi φ, relative primes can be 3, 5, 7, 9…
Select one of the relative primes, e. I am going to pick e = 7.

4. Find the inverse of e with respect of φ. That way we can find d.
The equation can be put out like this:
e*d mod φ(n) = 1
We need to solve d:
d is going to be solved by using the extended Euclidean algorithm.
For the love of mathematics in WordPress editor and because of the laziness, I am not going to explain the extended Euclidean algorithm here, please refer this video.
By calculating like in the video, we come to conclusion that the magic number d = 23.

5. To find out if our equation works (e*d mod φ(n) = 1)
we can use the calculated numbers to test it out:
e = 7, d = 23, φ(n)=40
7*23 mod 40 = 1 <-- IT WORKS :)

Private and Public key
After calculating e, d and n, we have successfully calculated the public and private key components.
Private key: d = 23 (your private information!), n = 55 (RSA public modulus) .
Public key: e = 7, n = 55

These posts are done in a purpose of being my personal notes for Information Security course exam. Might contain some inaccurate information.

Sources and check these out:
– Aalto materials
Euclidean Algorithm
The extended Euclidean algorithm
How the RSA algorithm works, including how to select d, e, n, p, q, and φ (phi)
Paper and Pencil RSA (starring the extended Euclidean algorithm)
Relatively prime numbers

Miksi sähköinen asiakkuudenhallinta kannattaa?

”Kyllä me ollaan aina tehty näin, niin miksi pitäisi vaihtaa?”

Elämme vuotta 2014, on pilvipalvelua, pitkälle kehittynyttä järjestelmää, mobile firstia ja SaaS:ia. Jokaiselle tuntuu löytyvän jotakin. Ensi vuonna vielä enemmän. Silti elämme aikaa, jolloin yrittäjää on vaikea saada luopumaan näkemyksestä, että asiakkuudenhallinta tarkoittaa paperin, kynän ja excel-taulukoiden sekamelskaa.

(lisää…)

iinurmi tweets, oh I know…

Shameless self promotion. I have noticed that sometimes it is just so much easier to post a interesting link or a short text of your thoughts and that’s why I recently started to TWEET. So in other words I’m lazy.

If you want to hear some CRAZY stuff, please follow me on twitter Follow @iinurmi. I have been tweeting some tech stuff, stuff on the entrepreneurship and typical, ”oh look at this cool link I found and probably everybody else in the internet”.

Back from the death

I have to admit I am not the person who is good at planning and organizing his life in advance, I have rather been the kind of person who just goes with the flow.  But in the start of 2014 I did the first time some kind of new year’s resolutions and I have to admit that those promises can be useful, if you don’t just write down things that you want to improve, but also write short plan how you are going to reach that goal. I would really recommend that really go trough your goal, why you want to achieve or improve something, then write how you are going to do it. Remember to be realistic.

I had four things in my new year’s resolutions list. One was to write at least once a month in the blog. That failed… As those promises usually do. So what did go wrong? I think a lot of things has been happening to me, work, projects and personal interests.

I did learn that don’t take your resolutions too seriously, because what you might have wanted to do in the start of the year. might not be relevant in the end of the year. Like in the summer my goal to write every month wasn’t relevant at the moment and I had much more things that was higher in the priority list.

But still I ”failed” and it should not be hard task write once a month! So I am going to advice myself and others that have this kind of goal. Write the blog post, article or what ever you have, AT the MOMENT when you feel inspired or are working with the subject. It is really hard write something after you have already moved past the subject.

a Day with Solinor!

solinroI had the opportunity to visit the Solinor headquarters. This was part of Haaga-Helias ICT-entrepreneurship -course. Solinor is a Finnish technology company specialized in payment system software. They are the first Finnish company to implement service with certified with PCI DSS. Solinor is also one of the fastest growing tech companies in Finland and has still a lot of growing space. The growth is visible for the newcomer also: first we were introduced to the building site of new office and negotiation rooms.

I, Samuel Rautiainen and Aicha Haidara had the pleasure to meet some key members from Solinor team, Joel Leino, Marko Kuusniemi and Timo Hakkarainen. They were very open to discuss about the company and we were unexpectedly well received to ”interrupt” their normal work day. Solinor seemed to have very professional, but easygoing work-environment. There is no ”nannying” over each other, every worker is expected to be responsible for his work. This way the work hours can be flexible rather than working from eight to four.

This was the first company visit of the course and it really set the bar high for other interviews. As a part of the course we will be releasing more in depth report, which will contain more what we learned at Solinor, basic information and economic factors such as revenues, business models and more!

Thanks for Solinor!

Quick Update: theme

Yep! I changed the wordpress theme and the code parts are all over the place. WordPress has not been the best option if you want to paste code here. I will probably be posting more code as a file or in smaller parts that it will be readable.

I still think that the new appearance is much more cooler than the old one.

End of semester

Today my mobile development course ended and I belive it is the time to close the show with Time Bomb Defuse. Time Bomb has been updated to it’s (current)final form and has a tutorial finally. I made few changes also to make it look better. You should check it out! Thanks for all the downloads for everybody it has been a blast. Time Bomb Defuse will now go for it’s well deserved winter sleep and will wake up only if there’s demand for it.

So it has been a rough semester with the mobile course and all the other courses. I made a online pizza-service, mobilegame, learned some math (probably), had a few meetings, made an interface and wasn’t able to drag myself to the gym enough.

Let’s see if I blog more in next year!