GNUTLS: Basic Connection with OpenSSL

It's an interesting problem: how to make it LOOK like we're using one library, when we're actually using a completely different one? GNUTLS comes packaged with an openssl library (-l gnutls-openssl) and associated headers (gnutls/openssl.h). They do a fairly admirable job of allowing us to keep our OpenSSL code. I've noticed a couple of problems, though: BIO_set_conn_hostname()

Diffie Hellman: The Basic Asymmetric Cipher

The Diffie-Hellman Key exchange is one of the older (and consequently simpler) asymmetric key exchange protocols. There are few better ways to understand the basic principles of asymmetric key exchange. The Values Diffie Hellman is a technique which produces a shared symmetric key based on asymmetric values. That is, without access to both ends of the

Encryption: Symmetric and Asymmetric Keys

DES and AES are very similar encryptions. So similar, in fact, that you might think to put them into a category. Today we'll look at two common categories of encryptions - symmetric key and asymmetric key encryptions. Symmetric Key Symmetric key encryptions rely on both the recipient and the sender having a shared key which no one

Encryption Case Study: DES

Fair warning: this is a bit more technical than most of my posts. The basic idea I want to convey is this - if we combine several simple operations and repeat them multiple times, we can create encryptions that are very hard to crack. We've covered some basic encryption concepts so far, so let's take

Linux + C – Awk Example: Line Counter

Like most things, learning awk is much easier with examples. Today we'll look at a simple awk script which counts lines of code based on their type. The Code: linecount The following code uses a lot of regular expressions to determine the nature of a line. There are three formats for these if statements: if($0 ~ /REGEX/)