Protecting your privacy: asymmetric cryptography (part 2)

This is the second of four posts in which I discuss cryptography. If you read all four posts, you will understand the differences between symmetric and asymmetric cryptography, why the US government were against the spread of modern cryptography, how it has resulted in the first crypto war between code rebels (techno-libertarians) and the US government, and how you can easily protect your privacy using Pretty Good Privacy (PGP).

The topics of the four posts are:

  1. What is symmetric cryptography;
  2. What is asymmetric (public key) cryptography;
  3. The first crypto war between code rebels and the government;
  4. How to easily use PGP to protect your e-mail communication.

What is asymmetric (public key) cryptography

In my previous post, I mentioned four disadvantages of symmetric cryptography. These disadvantages are:

  1. The secret key must be shared between sender and receiver, before messages can be exchanged safely, preferably over a secure channel.
  2. The secret key is in two separate places.
  3. The sender of the message must trust the receiver that he will not steal or copy the secret key.
  4. It is not scalable for, for example, e-commerce.

Soon after the publication of the Data Encryption Standard (DES), asymmetric (public key) cryptography was invented by the Stanford graduate student, Whitfield Diffie, and Stanford Professor, Martin Hellman. This was a huge revolution within cryptographic research, because up until then it was thought that there should always be a shared secret key for the communication between the sender and receiver. The main question that Diffie and Hellman were trying to solve was: how can you create secure communication over a unsecure channel, when two corresponding people have never had contact with one another and therefore have not yet been able to share secret keys with each other.

The solution, public key cryptography, was introduced by Diffie and Hellman in their paper, ‘New Directions in Cryptography’ (1976). It inspired more cryptographic research outside the circles of secret agencies. Soon after the first publication on public key cryptography, three young Professors at MIT, Ron Rivest, Adi Shamir and Leonard Adleman, developed the now famous RSA public key cryptosystem in 1977.

Merkle Diffie Hellman
Ralph Merkle, Martin Hellman, and Whitfield Diffie. Merkle is known for his invention of Merkle trees, which is a tree-like structure of cryptographic hashes that organizes for example Bitcoin transactions. The public key cryptosystem, as published in ‘New Directions in Cryptography’, is mostly known as the Diffie-Hellman key exchange. Hellman, however, recognizes the contributions of Merkle for the Diffie-Hellman key exchange.
RSA
Adi Shamir, Ron Rivest, and Len Adleman. Inventors of the RSA cryptosystem.

Public key cryptography works as follows. There are two separate keys that correspond mathematically with one another: the public key and the private key. The public key is used to encrypt a message, and can be shared to other people. The private key is used to decrypt a message, and should be kept secret. Public key cryptography is hence a two way function. Just by knowing someone’s public key, it’s not possible to find out the person’s private key.

In our below example,

  1. Alice would like to send a secret love message to Bob.
  2. Bob has a corresponding public an private key, and sends the public key over a unsecure channel to Alice.
  3. Alice uses Bob’s public key to encrypt her secret love message.
  4. Alice sends the secret love message to Bob.
  5. Bob uses the corresponding private key to decrypt the message and finds out that Alice loves him.
Public Key cryptography
Alice and Bob use public key cryptography to exchange secret messages.

Doing so, you can have private correspondence over an unsecure channel. Actually, we’re using public key cryptography all the time. Whenever you see a green padlock in front of the URL bar, it means that the data you enter on the website is first encrypted before it’s sent out.

Digital Signatures

Public key cryptography is not only used for the encryption and decryption of messages, but also for message authentication. If Alice would not have encrypted her message with Bob’s public key, but with her own private key, then the encrypted message can be decrypted with her public key. If you receive a message of John Locke and you’d like to know whether it’s really sent out by Locke, then you could look up his public key and use it to decrypt his message. If the result is plaintext, and assuming that Locke is the only person in the world who possesses the only private key that can produce the encrypted message, you can be sure that the message was sent by Locke. In other words: applying a private key to a message is the equivalent to putting a digital signature.

Digital Signatures
Alice puts a digital signature on her message, and Bob digitally verifies that the message is truly coming from Alice. This is an easy way of using digital signatures. In reality, a text is hashed first with a hash algorithm, before it is encrypted with the private key. Bob then uses Alice’s public key to decrypt the message to retrieve the hash, and compares the resulting hash with the original hash of Alice’s message.

Digital signatures are particularly important, because they provide the following security aspects:

  1. Authentication: it offers proof that the message comes from the right person.
  2. Non-repudiation: we cannot deny that the signee has sent it.
  3. Data integrity: the message cannot be altered after it has been signed.

Diffie and Hellman saw great potential for public key cryptography in the coming digital age. The US secret intelligence, however, were not happy with this development in cryptography and tried to prevent public use of this new cryptosystem. The standoff between privacy advocates of whom many were cryptographers and the US government is known as the first crypto war.

In part three of this series, we will discuss the crypto war. Eventually, at the end of the post series, you will be able to encrypt your e-mails using public key cryptography.

Protecting your privacy: symmetric cryptography (part 1)

In my previous post, I discussed the decline of internet freedoms around the world. While writing the post, I realized that I should follow-up on the topic and discuss how we can use cryptography to protect our communication from surveillance by governments and corporations.

This is the first of four posts in which I discuss cryptography. If you read all four posts, you will understand the differences between symmetric and asymmetric cryptography, why the US government were against the spread of modern cryptography, how it has resulted in the first crypto war between code rebels (techno-libertarians) and the US government, and how you can easily protect your privacy using Pretty Good Privacy (PGP).

The topics of the four posts are:

  1. What is symmetric cryptography;
  2. What is asymmetric (public key) cryptography;
  3. The first crypto war between code rebels and the government;
  4. How to easily use PGP to protect your e-mail communication.

What is symmetric cryptography

The use of cryptography is more than 4,000 years old. A classic example of symmetric cryptography is the Caesar cipher. It was used by Julius Caesar for his private correspondence with his generals.

The principle of the Caesar cipher is simple. The receiver of the message has to replace each letter with another letter, some number of fixed positions down the alphabet. If a Caesar cipher, for example, makes use of a rotation of three to the left,

  • A in the encrypted text becomes X
  • C becomes Z
  • E becomes B
  • etc…
Caesar cipher
Caesar cipher: rotation of three to the left.

A Caesar cipher, compared to modern encryption methods, can be easily deciphered. You can for example make a frequency analysis of letters and see whether the letters in the encrypted text resemble typically Dutch or English writing. Also, each letter in the encrypted text only has 26 possibilities in the decrypted text, including itself. You can also make a table in which you write down the text and let a computer replace each letter with all 26 possibilities.

Up until the 1970s, cryptographers made use of this type of cryptography – also known as symmetric cryptography.

With symmetric cryptography, there is one key (the secret key) that is used for encrypting and decrypting the message. It’s therefore necessary for the sender of the message to share the secret key with the party he would like to correspond with.

The Caesar cipher is considered to be symmetric cryptography, because knowing the exact rotation (secret key) that is used to encrypt the message, you do also know how to decrypt the message.

Symmetric cryptography
Symmetric cryptography. One key (the secret key) is used for the encryption and decryption of messages.

Disadvantages of symmetric cryptography

There are several disadvantages to symmetric cryptography.

The first disadvantage is that the secret key has to be shared between the sender and receiver for messages to be exchanged privately. Sending the secret key over an unprotected communication channel is not recommended. In the next post, we will see how asymmetric (public key) cryptography allows us to send the encryption key safely over unprotected communication channels, while keeping the decryption key safely in our own possession.

The second disadvantage is that the secret key is now on two different locations. Thus, there are now two points of attack.

The third disadvantage is that the sender has to trust the receiver that he will not steal or copy the key or give it to someone else. It’s comparable to sharing the keys to your apartment: you also have to trust the other person not to steal your key, or copy your key, or give the key to another person.

The fourth disadvantage is limited scalability. Assuming that we’d like to communicate with a great number of parties, and that we’d like to provide each party with a different secret key for security reasons, we’d need to maintain a database of secret keys. For this setup to be user friendly in an environment like the internet, it would probably require an infrastructure of specialized distribution centers that generate secret keys each time two parties would like to initiate a private conversation. As these distribution centers would hold many secret keys, it would be a honey pot for hackers.

An example of symmetric cryptography is the Data Encryption Standard (DES), which was released on the market in 1975. It was developed by IBM, and was primarily meant to protect electronic communication between large financial organizations. Up until DES, cryptography was mainly a field for governments’ secret intelligence agencies to protect state communication. When the DES was released, it was received very well by cryptographers, until people found out that the National Security Agency (NSA) was involved with the development of the encryption key and purposefully influenced IBM to limit the key sizes from 64 bits to 56 bits. With 56 bits, there are 2^56 possible key combinations. This is considerably less than 64 bits keys. It is therefore much easier to break the encryption. Cryptographers believed that it would just be a matter of time before someone would find the right keys through a brute force search – meaning that you are trying all possible key combinations to find the right one.

Symmetric cryptography was the way cryptography was done until 1976 when two young researchers from Stanford University, Whitfield Diffie and Martin Hellman, invented asymmetric or public key cryptography.

Both researchers were discontent with DES, and Hellman even addressed a letter to the Secretary of Commerce, Elliot Richardson, saying:

I am writing to you because I am very worried that the National Security Agency has surreptitiously influenced the National Bureau of Standards [NBS] in a way which seriously limit the value of a proposed standard, and which may pose a threat to individual privacy. I refer to the proposed Data Encryption Standard. … I am convinced that NSA in its role of helping NBS design and evaluate possible standards has ensured that the proposed standard is breakable by NSA.

In my next post, I will discuss how public key cryptography works. Eventually, at the end of the post series, you will be able to encrypt your e-mails using public key cryptography.

Introducing “Be Our Guest,” a new component of NOL

Check out NOL‘s newest feature, a place where you can have your thoughts and arguments published in a house of decency and legitimacy. The first guest essay comes from Ben Sharvy, a teacher in Portland, on, among other things, vaccines and the lack thereof:

What’s the damage done? Cancer patients who forego conventional treatment and exclusively choose alternative medicine are 2.5 times more likely to die. Women with breast cancer fare the worst — with a 5.7 times higher death rate among those who choose only alternative therapies. Multiple studies agree, including a 2017 report from the National Cancer Institute: Alternative medicine kills.

Read the rest, and by all means, submit your own thoughts to us. Tell your friends about this project, too.

Why this feature? Mostly because of the rather high volume of submissions I have been getting lately. Many of these pieces don’t really fit in with NOL‘s overall vibe, but that doesn’t mean they’re not worth reading or putting out into the world. So, be our guest.

Why Privacy Matters Even if You Have ‘Nothing to Hide’ – The Chronicle of Higher Education

http://m.chronicle.com/article/Why-Privacy-Matters-Even-if/127461/
This is a great essay on how to compellingly counter the “nothing to hide” argument.

War criminal Watch: Condoleezza Rice now on dropbox’s board of directors.

Yesterday the company that specializes in remote file sharing announced that former Secretary of State Condoleezza Rice is now on their board of directors.  This is troubling news for a number of reasons.  The first, more pedantic reason, is simply that she played no small role in the deaths of several hundred thousand people throughout the middle east as well as the unnecessary deaths of thousands of US soldiers.  More practically though she was a member of the presidency that pushed the PATRIOT Act and is now working intimately with a company that has access to millions of personal files.

For those of you who do not know the dropbox software essentially allows you to put files in a folder on your PC where they are synced to the “cloud”.  You, or anyone else, are then free to download those files from anywhere in the world as long as you know the link to said file.   It is a handy way to transfer files that may be too large for an E-Mail attachment or that you simply do not trust google having access to.  From this point forward I would question the security of any file transferred with dropbox.

Oh and by the way. Snowden documents from last year state “that it is planning to add Dropbox as a PRISM provider.”  

PRISM, of course, being an NSA program “which allows officials to collect material including search history, the content of emails, file transfers and live chats,”   

How many more “coincidences” that just happen to violate rights, privacy, security and safety are we going to sweep under the rug?

The Meaning of Social Science: Ideology, Private Life, and the Internet

[Note: This is a guest essay by Dr Peter Miller, who is a sociologist (PhD, Berkeley), a longtime resident of Japan, a non-participant observer of the American scene, and (since 1991) one of the world’s few practitioners of original photogravure etching, whose semi-abstract Japan-influenced prints are in private and museum collections in Japan, Europe, Russia, and the United States. His websites can be found here & here]

Social-science expertise has been missing from current discussions of government-led spying on private citizens and the proper role of government in general. Ideologies, which is to say gut reactions, have corrupted the public debate; but there is nevertheless a role for sociological analysis of these phenomena.

Social science in its modern form started as a mostly European effort to explain the origins of the horrible totalitarianism that engulfed Europe, and to deduce the structure of institutions that would prevent it from arising again. The Nazi, Soviet, and Fascist systems were all characterized by total State-control of all aspects of life, including the most private aspects of life. Whether the ostensible purpose was re-casting human nature into the ‘new Soviet man’ or an embodiment of the German ‘volk’, they quickly evolved into an apparatus for murdering large numbers of their citizenry. Of course the prospective victims had to be identified before they could be murdered. For this purpose a State apparatus of domestic spying and information-gathering was devised. Primitive by today’s standards, the forced wearing of Jewish stars and the forced confessions by purported enemies of the State were crudely effective in generating large numbers of victims. Social scientists asked ‘How did this happen? What can be done to prevent its recurrence?’

The essential answer to the first question, distilled from reams of scholarship, is: De-legitimization of private life. All the social space traditionally separating individuals from the State was systematically removed. Private enterprise was abolished. All universities and schools in Nazi Germany and the Soviet Union were taken over by government, run by political appointees, and staffed exclusively by those who would do their bidding. The same for the media, the churches (co-opted in Germany, eliminated in the Soviet Union), youth groups (Hitler Youth, Young Pioneers), and welfare organizations. All intermediary organizations that had previously functioned autonomously were either taken over by government, co-opted, intimidated into conformity, or forced out of existence. The sequence from privacy-deflation to total State control to mass murder progressed in roughly 15 years in the Soviet Union. In Nazi Germany, with more intensive propaganda and ‘education’, this sequence took only five years.

From this historical record, social scientists deduced that properly functioning democracies require lively intermediary organizations — churches, labor unions, 4-H clubs, PTAs, bowling clubs, whatever. Re-reading Tocqueville and Madison, social scientists re-discovered with these sages a high regard for such humble institutions (not that there were bowling clubs in Madison’s day, but you get the idea). The Austrian School (Hayek et al) added private enterprise to this list of freedom-enhancing entities. And from Vienna also came Lazarsfeld who posited ‘cross-pressures’ — conflicting loyalties — as the essential building-blocks of democracy. His big idea was that a healthy democracy needed unpredictability, where a person’s ethnicity, race, religion, education, or social class did not necessarily determine his voting preferences or consumer choices.

Since the 1970s, American and Western European societies have tolerated and even encouraged a progressive tribalization of their societies. Race, ethnicity, and sexual-identity have become increasingly salient in the distribution of government largesse, and consequently in the determination of political and consumer choices. Both public and private universities rely increasingly on government funding, and thus take their orders from the State, in research priorities, curricula, staffing, and extra-curricular activities. With some exceptions and counter-trends, the period since the 1970s has witnessed a progressive weakening of the autonomous mediating organizations that sociologists identified as essential to the working of democracy.

Separately, the growth of the Internet has deflated the private sphere, at first due in large part to the apparently voluntary choices of Internet users themselves. Only a few years ago the fad of the moment was 24/7 live webcams turned on oneself for the world to see. Now security cameras that do the same thing outdoors are all-pervasive. The collective mantra, highly promoted by the giant Internet companies, is ‘If you have nothing to hide, why be concerned?’ This is the tradeoff for ‘serving you better’. Mobile phones with geo-tracking are surely a great improvement in the quality of life, as is the proliferation of answers to life’s unanswered questions, and the blessings of instant communication. In return for all that, what does the loss of privacy matter?

I always doubted the business model of Internet-tracking. It never seemed plausible to me that a teen-ager with zits who happens to be in a drugstore is any more likely to buy zit-off after getting zapped with an ad on his geo-tracked mobile at that moment than if he weren’t zapped. The whole business of click-tracking, Web-tracking, and the like never made commercial sense to me. It was always hype — good for securing VC funding and not much else. But investors in these large-scale personal-data-gathering companies were not stupid. Behind our backs, these companies were getting paid by governments to sell users’ data. Their business model was not based on the supposed commercial utility of precise ad-targeting, but on secret NSA demands for indiscriminate personal data. Governments, under the banner of fighting terror, and shielded from Congressional or public scrutiny, have unlimited taxpayer funds to finance these transactions.

With the Snowden revelations, we now have a better understanding of the extent of Internet and telecom surveillance. Of course, this cannot have been a complete surprise. Nevertheless the near-universal scale of the surveillance, plus the technological capacity to sort and search the data, make for a real game-changer. As one security expert said in a recent interview:

The most shocking aspects of Edward Snowden’s courageous revelations is the scale of surveillance. Every one of us involved in this field, I think it’s fair to say, has not been surprised by what is possible but had assumed perhaps out of hope or fear that they were limited in what they did and were proportionate, and that although we didn’t believe they would just stick to terrorism they would not try to reach for everything.

But every single document, speech and slideshow shows that a bunch of juvenile lunatics have taken over the asylum and are drunk and exuberant on their capabilities to spy on everything all the time and that is what they want to do. They have lost every sort of moral compass and respect for civic values.

The problem is that many European countries, notably Britain but not exclusively Britain, have been complicit in these activities as a result of favours, trade or encouragement. Basically the NSA has, over years with Britain’s assistance, essentially tried to subvert companies and governments into a surveillance empire which is almost a supranational enterprise of their own.

The question is, to what end? As we know in sociology, not everything is what it seems. Just as the indiscriminate sweeping-up of personal data lacked a plausible commercial basis, though it still made business sense if the data were sold to government spy agencies, it is likewise implausible that all that data has much utility in fighting terror. What then is it good for?

I think that question has yet to be answered; that the answer will depend on what use the new owners of that data make of it. The meaning of the massive loss of privacy that has occurred is immanent, it will emerge as further events unfold. As far as I am aware, the central-conspiracy model does not fit the case. What we have is a set of disparate elements that as yet have not coalesced into any coherent order. Among these elements are the increasing tribalization of society, de-legitimizing of autonomous intermediary organizations, and deflation of the private sphere. These are exactly the conditions that gave rise to the totalitarian horrors of the mid-20th century. It does not appear that any current Western leader has it in him to become another Hitler or Stalin. But the elements are there, awaiting a moment — perhaps another terrorist attack or financial crisis — that will call forth a charismatic savior.

Yet one must be especially careful with historical analogies to avoid the ‘generals-fighting-the-last-war’ syndrome. Things are very different now, compared with analogous conditions 80 years ago. The greatly expanded human freedom, communication, and educational prospects empowered by the Internet may overwhelm the efforts of governments to use it as an instrument of State control. This will be a titanic struggle, with the outcome still unclear. And that’s where I’ll leave it for now, pending further sociological inquiry into what-all this may portend.