11/22/2011

Crypto-tools: Printing Ciphertext in Chunks

Now that we have generated ciphertext, it looks pretty much like a bunch of random characters which is not easily readable. That's why it's common practice for ciphertext to be wrote grouped into small chunks of 3, 4, 5 or more characters. The function we will write now is made to do exactly that.

Crypto-tools: Input Validation

Last time we wrote some functions which will work only if the input string is valid - all capital letters and no other characters allowed. That's because in cryptography, in order to make some (mostly classic) ciphers work, you often need to encrypt just pure information, without extra spaces, commas etc. The functions for encryption and decryption can be pretty complicated, and we shouldn't have to write additional lines inside them just to make sure the input is valid. Instead, we will write a simple function which will convert our input to our-functions-friendly.

11/21/2011

Crypto-tools - Caesar Cipher 2

The exams are over, thank God :) Now, last time I tried to explain a simple program to encrypt and decrypt Caesar cipher. The thing is I did it in a pretty silly way. I didn't explain anything, I just wrote a piece of code and let you do whatever you want with it.

Today I started something new. I am making Crypto-tools to be a real project, with explanations, comments, standardized function declarations etc. So, whenever I add something new to it, I'll write a post here and add the code to the repository, so you can download it, test it, post questions and so on.

Last time we wrote two functions: encrypt() and decrypt(), which both work if the input string is properly formatted. What's really embarrassing is that I didn't make a single comment on the code. So, here's how stuff works:

11/14/2011

Crypto-tools - Caesar Cipher 1

Hi guys. Sorry for not writing too long, I have a lack of time these days because of my exams. So, I'll keep it short.

I started developing some tools for cryptography, that would basically cover my cryptography course in this semester. In order to keep this post as short as possible: if you want to know more about Caesar cipher, please visit Wikipedia: Caesar cipher. Now, let's do some coding.

11/07/2011

Make Your Own Hacker Typer 2

Last time we saw how to make the base for our version of Hacker Typer. Now, we could add some additional features, so we could choose which file we want to "type" and how many characters should output when we press a key.

11/06/2011

Emulate getch() in Linux

Now, suppose you need to use getch() function in Linux. Since this is not a standard function, and is constructed for DOS, it's not really defined for Linux. However, you can simply emulate it... Here's how

Make Your Own Hacker Typer 1

Today our first follower on Twitter, @aleksandar6630, asked me to visit an interesting application, Hacker Typer by Simone Masiero, to click 'Hack!' and to type. You can try it now by yourself. Pretty awesome?! It is open source, so if you're into JavaScript, you can check out Hacker Typer on github. But, Aleksandar gave me an idea for my first code here - let's see how we can write our own Hacker Typer in C!

Prepare for Work

If you want to test your programming skills in C, there are some things that you probably already have installed, but it's worth repeating. So, here's what I usually use...

11/05/2011

A Typical Hello World Post

Hi! If you are reading this, you found me, probably after googling some stuff about C programming. So, welcome!

This blog is basically about algorithms, coding in C, and, eventually, living in C. I don't give any warranties for the solutions I publish here - as you can see, I am pretty much newbie in real, serious problems (although I am not one of C newbies, however). I like to help people, I would like to do something serious, but I am still a student who has to learn random things and, because of that, cannot participate enough in THE real wold.