Saturday, June 15, 2013

NSA-proof encryption exists. Why doesn’t anyone use it?

NSA-proof encryption exists. Why doesn’t anyone use it?


12068A04.TIFComputer programmers believe they know how to build cryptographic systems that are impossible for anyone, even the U.S. government, to crack. So why can the NSA read your e-mail?
Last week, leaks revealed that the Web sites most people use every day are sharing users’ private information with the government. Companies participating in the National Security Agency’s program, code-named PRISM, include Google, Facebook, Apple and Microsoft.
It wasn’t supposed to be this way. During the 1990s, a “cypherpunk” movement predicted that ubiquitous, user-friendly cryptographic software would make it impossible for governments to spy on ordinary users’ private communications.
The government seemed to believe this story, too. “The ability of just about everybody to encrypt their messages is rapidly outrunning our ability to decode them,” a U.S. intelligence official told U.S. News & World Report in 1995. The government classified cryptographic software as a munition, banning its export outside the United States. And it proposed requiring that cryptographic systems have “back doors” for government interception.
The cypherpunks won that battle. By the end of the  Clinton administration, the government conceded that the Internet had made it impossible to control the spread of strong cryptographic software. But more than a decade later, the cypherpunks seem to have lost the war. Software capable of withstanding NSA snooping is widely available, but hardly anyone uses it. Instead, we use Gmail, Skype, Facebook, AOL Instant Messenger and other applications whose data is reportedly accessible through PRISM.
And that’s not a coincidence: Adding strong encryption to the most popular Internet products would make them less useful, less profitable and less fun.
“Security is very rarely free,” says J. Alex Halderman, a computer science professor at the University of Michigan. “There are trade-offs between convenience and usability and security.”
Most people’s priority: Convenience
Consumers have overwhelmingly chosen convenience and usability. Mainstream communications tools are more user-friendly than their cryptographically secure competitors and have features that would be difficult to implement in an NSA-proof fashion.
And while most types of software get more user-friendly over time, user-friendly cryptography seems to be intrinsically difficult. Experts are not much closer to solving the problem today than they were two decades ago.
Ordinarily, the way companies make sophisticated software accessible to regular users is by performing complex, technical tasks on their behalf. The complexity of Google, Microsoft and Apple’s vast infrastructure is hidden behind the simple, polished interfaces of their Web and mobile apps. But delegating basic security decisions to a third party means giving it the ability to access your private content and share it with others, including the government.
Most modern online services do make use of encryption. Popular Web services such as Gmail and Hotmail support an encryption standard called SSL. If you visit a Web site and see a “lock” icon in the corner of your browser window, that means SSL encryption is enabled. But while this kind of encryption will protect users against ordinary bad guys, it’s useless against governments.
That’s because SSL only protects data moving between your device and the servers operated by Google, Apple or Microsoft. Those service providers have access to unencrypted copies of your data. So if the government suspects criminal behavior, it can compel tech companies to turn over private e-mails or Facebook posts.
That problem can be avoided with “end-to-end” encryption. In this scheme, messages are encrypted on the sender’s computer and decrypted on the recipient’s device. Intermediaries such as Google or Microsoft only see the encrypted version of the message, making it impossible for them to turn over copies to the government.
Software like that exists. One of the oldest is PGP, e-mail encryption software released in 1991. Others include OTR (for “off the record”), which enables secure instant messaging, and the Internet telephony apps Silent Circle and Redphone.
  
But it’s difficult to add new features to applications with end-to-end encryption. Take Gmail, for example. “If you wanted to prevent government snooping, you’d have to prevent Google’s servers from having a copy of the text of your messages,” Halderman says. “But that would make it much harder for Google to provide features like search over your messages.” Filtering spam also becomes difficult. And end-to-end encryption would also make it difficult for Google to make money on the service, since it couldn’t use the content of messages to target ads.
A similar point applies to Facebook. The company doesn’t just transmit information from one user to another. It automatically resizes users’ photos and allows them to “tag” themselves and their friends. Facebook filters the avalanche of posts generated by your friends to display the ones you are most likely to find the most interesting. And it indexes the information users post to make it searchable.
These features depend on Facebook’s servers having access to a person’s private data, and it would be difficult to implement them in a system based on end-to-end encryption. While computer scientists are working on techniques for creating more secure social-media sites, these techniques aren’t yet mature enough to support all of Facebook’s features or efficient enough to serve hundreds of millions of users.
Other user headaches
End-to-end encryption creates other headaches for users. Conventional online services offer mechanisms for people to recover lost passwords. These mechanisms work because Apple, Microsoft and other online service providers have access to unencrypted data.
In contrast, when a system has end-to-end encryption, losing a password is catastrophic; it means losing all data in the user’s account.
Also, encryption is effective only if you’re communicating with the party you think you’re communicating with. This security relies on keys — large numbers associated with particular people that make it possible to scramble a message on one end and decode it on the other. In a maneuver cryptographers call a “man in the middle” attack, a malicious party impersonates a message’s intended recipient and tricks the sender into using the wrong encryption key. To thwart this kind of attack, sender and recipient need a way to securely exchange and verify each other’s encryption keys.
“A key is supposed to be associated closely with a person, which means you want a person to be involved in creating their own key, and in verifying the keys of people they communicate with,” says Ed Felten, a computer scientist at Princeton University. “Those steps tend to be awkward and confusing.”
And even those who are willing to make the effort are likely to make mistakes that compromise security. The computer scientists Alma Whitten and J.D. Tygar explored these problem in a famous 1999 paper called “Why Johnny Can’t Encrypt.” They focused on PGP, which was (and still is) one of the most popular tools for users to send encrypted e-mail.
PGP “is not usable enough to provide effective security for most computer users,” the authors wrote.
Users expect software to “just work” without worrying too much about the technical details. But the researchers discovered that users tended to make mistakes that compromise their security. Users are supposed to send other people their “public key,” used to encode messages addressed to them, and to keep their private key a secret. Yet some users foolishly did the opposite, sending others the private key that allowed eavesdroppers to unscramble e-mail addressed to them. Others failed to make backup copies of their private encryption keys, so when their hard drives crashed, they lost access to their encrypted e-mail.
Using PGP is such a hassle that even those with a strong need for secure communication resist its use. When Edward Snowden, the man who leaked the details of the PRISM program, first contacted Glenn Greenwald at the Guardian in February, he asked the journalist to set up PGP on his computer so the two could communicate securely. He even sent Greenwald a video with step-by-step directions for setting up the software. But Greenwald, who didn’t yet know the significance of Snowden’s leaks, dragged his feet. He did not set up the software until late March, after filmmaker Laura Poitras, who was also in contact with Snowden, met with Greenwald and alerted him to the significance of his disclosures.
Going with the flow
Felten argues that another barrier to adopting strong cryptography is a chicken-and-egg problem: It is only useful if you know other people are also using it. Even people who have gone to the trouble of setting up PGP still send most of their e-mail in plain text because most recipients don’t have the capability to receive encrypted e-mail. People tend to use what’s installed on their computer. So even those who have Redphone will make most of their calls with Skype because that’s what other people use.
Halderman isn’t optimistic that strong cryptography will catch on with ordinary users anytime soon. In recent years, the companies behind the most popular Web browsers have beefed up their cryptographic capabilities, which could make more secure online services possible. But the broader trend is that users are moving more and more data from their hard drives to cloud computing platforms, which makes data even more vulnerable to government snooping.
Strong cryptographic software is available to those who want to use it. Whistleblowers, dissidents, criminals and governments use it every day. But cryptographic software is too complex and confusing to reach a mass audience anytime soon. Most people simply aren’t willing to invest the time and effort required to ensure the NSA can’t read their e-mail or listen to their phone calls. And so for the masses, online privacy depends more on legal safeguards than technological wizardry.
The cypherpunks dreamed of a future where technology protected people from government spying. But end-to-end encryption doesn’t work well if people don’t understand it. And the glory of Google or Facebook, after all, is that anyone can use them without really knowing how they work.

Friday, June 14, 2013

Differentiate Encryption From Compression Using Math

Differentiate Encryption From Compression Using Math


When working with binary blobs such as firmware images, you’ll eventually encounter unknown data. Particularly with regards to firmware, unknown data is usually either compressed or encrypted. Analysis of these two types of data is typically approached in very different manners, so it is useful to be able to distinguish one from the other.
The entropy of data can tell us a lot about the data’s contents. Encrypted data is typically a flat line with no variation, while compressed data will often have at least some variation:
Entropy graph of an AES encrypted file
Entropy graph of an AES encrypted file
Entropy graph of a gzip compressed file
Entropy graph of a gzip compressed file
But not all compression algorithms are the same, and some compressed data can be very difficult to visually distinguish from encrypted data:
Entropy graph of an LZMA compressed file
Entropy graph of an LZMA compressed file
However, there are a few tests that can be performed to quantify the randomness of data. The two that I have found most useful are chi square distribution and Monte Carlo pi approximation. These tests can be used to measure the randomness of data and are more sensitive to deviations in randomness than a visual entropy analysis.

Chi square distribution is used to determine the deviation of observed results from expected results; for example, determining if the outcomes of 10 coin tosses were acceptably random, or if there were potentially external factors that influenced the results. Substantial deviations from the expected values of truly random data indicate a lack of randomness.
Monte Carlo pi approximation is used to approximate the value of pi from a given set of random (x,y) coordinates; the more unique well distributed data points, the closer the approximation should be to the actual value of pi. Very accurate pi approximations indicate a very random set of data points.
Since each byte in a file can have one of 256 possible values, we would expect a file of random data to have a very even distribution of byte values between 0 and 255 inclusive. We can use the chi square distribution to compare the actual distribution of values to the expected distribution of values and use that comparison to draw conclusions regarding the randomness of data.
Likewise, by interpreting sets of bytes in a file as (x,y) coordinates, we can approximate the value of pi using Monte Carlo approximation. We can then measure the percentage of error in the approximated value of pi to draw conclusions regarding the randomness of data.
Existing tools, such as ent, will perform these calculations for us. The real problem is how to interpret the results; how random is encrypted data vs compressed data? This will depend on both the encryption/compression used, as well as the size of your data set (more data generally means more accurate results). Applying these tests to a (admittedly small) sample of files with varying size which had been put through different compression/encryption algorithms showed the following correlations:
  • Large deviations in the chi square distribution, or large percentages of error in the Monte Carlo approximation are sure signs of compression.
  • Very accurate pi calculations (< .01% error) are sure signs of encryption.
  • Lower chi values (< 300) with higher pi error (> .03%) are indicative of compression.
  • Higher chi values (> 300) with lower pi errors (< .03%) are indicative of encryption.
For example, here is a comparison of the same 24MB file after being put through the AES, 3DES, gzip and lzma algorithms:
AlgorithmChi Square DistributionPi Approximation Error
None15048.60.920%
AES351.68.022%
3DES357.50.029%
LZMA253.54.032%
Gzip11814.28.765%
As you can see, gzip has extreme differences between expected and observed data randomness, making it easy to identify. LZMA is much closer to the AES and 3DES encryption results, but still shows significant variations, particularly on the chi square distribution.
Using these tests, we can usually determine if an unknown block of data is encrypted or compressed and proceed with any further analysis accordingly (identification of specific algorithms may also be possible, but much more work would need to be done to determine if such an endeavor is even feasible, and I have my doubts).
The problem with using a tool like ent against a firmware image (or any third-party data for that matter) is that the entire image may not be encrypted/compressed. In a real-world firmware image, there may be multiple blocks of high-entropy data surrounded by lower entropy data.
Here, we see that binwalk has identified one high entropy block of data as LZMA compressed based on a simple signature scan. The second block of high entropy data however, remains unknown:
Binwalk signature scan
Binwalk signature scan
To prevent the low entropy data in this firmware image from skewing our results, we need to focus only on those blocks of high entropy data and ignore the rest. Since binwalk already identifies high entropy data blocks inside of files, it was a simple matter of adding the chi square and Monte Carlo tests to binwalk, as well as some logic to interpret the results:
Binwalk entropy scan, identifying unknown compression
Binwalk entropy scan, identifying unknown compression
DECIMAL    HEX        ENTROPY ANALYSIS
-------------------------------------------------------------------------------------------------------------------
13312      0x3400     Compressed data, chi square distribution: 35450024.660765 (ideal: 256), monte carlo pi approximation: 2.272365 (38.252134% error)
1441792    0x160000   Compressed data, chi square distribution: 6464693.329427 (ideal: 256), monte carlo pi approximation: 2.348486 (33.771003% error)
Here, binwalk has marked both high entropy blocks as compressed data, and the large deviations reported for both tests supports this conclusion. As it turns out, this is correct; after further analysis of the firmware, the second block of data was also found to be LZMA compressed. However, the normal LZMA header had been removed from the data thus thwarting binwalk’s signature scan.
If you want to play with it, grab the latest binwalk code from the trunk; this is still very preliminary work, but is showing promise. Of course, the usual cautions apply: don’t trust it blindly, errors will occur and false positives will be encountered. Also, since I’m not a math geek, any feedback from those who actually understand math is appreciated. :)

Thursday, June 13, 2013

New encryption method promises end-to-end cloud security

        
Encrypted data flows to the cloud and back

New encryption method promises end-to-end cloud security

Researchers at the Massachusetts Institute of Technology have developed an encryption technique that, down the road, could make cloud computing more secure by ensuring that data remains encrypted while being processed.
The system combines three existing schemes — homomorphic encryption, garbled circuit and attribute-based encryption — into what the researchers call a functional-encryption scheme, according to a report in MIT News. The result is that a database in the cloud could handle a request and return a response without data being decrypted.
A scheme that keeps data secure every step of the way would likely appeal to public-sector agencies, which are increasingly moving applications and services to cloud systems, although for the foreseeable future they’ll have to rely on current security measures. The key barrier right now is computing power — the functional-encryption scheme requires more of it than would be practical.
But the researchers point out that the scheme is nascent and performance improvements, as in other areas of computing, are likely. “It’s so new, there are so many things that haven’t been explored — like, ‘How do you really implement this correctly?’ ‘What are the right mathematical constructions?’ ‘What are the right parameter settings?’” MIT associate professor Nickolai Zeldovich, of the co-authors of a paper on the subject, told MIT News.
Homomorphic encryption has been researched for decades, but the first fully homomorphic scheme was developed four years ago by Craig Gentry of IBM. In 2011, he offered MIT Technology Review a very simple demonstration of the mathematical consistency required: A user sends a request to add the numbers 1 and 2, which are encrypted to become the numbers 33 and 54, respectively. The server in the cloud processes the sum as 87, which is downloaded from the cloud and decrypted to the final answer, 3.

Monday, June 10, 2013

Hackers may have had access to resort's credit card system for eight months

       

Hackers may have had access to resort's credit card system for eight months

The financial information of guests at Callaway Gardens was stolen by thieves who implanted malware on the Pine Mountain, Ga. resort's credit and debit card systems.
How many victims? Unknown.
What type of personal information? No specifics have been given in terms of what kind of financial data was accessed.
What happened? On Thursday, a credit card processing company notified Callaway Gardens, as well as a number of other companies that it services, of suspicious transactions involving guests. It's unclear if all of the companies were compromised by the same malware, but the victim organizations were identified because thieves made fraudulent purchases at common locations.
What was the response? Callaway Gardens notified guests via email and social networking sites. Additionally, the company alerted the major card brands and credit reporting agencies.
Details: According to a Callaway Gardens spokeswoman, the breach started in early September.
Quote: “In our team's immediate investigation, fraudulent malware was detected, contained and removed,” Barry Morgan, CFO of Callaway Gardens, said.
Source: www.ledger-enquirer.com, Ledger-Enquirer, Callaway Gardens credit, debit card records breached” May 25, 2013.

Alleen al vanwege PRISM geen EPD

Alleen al vanwege PRISM geen EPD 


NSA taps into user data
Het afgelopen weekend domineerde het spionageschandaal het nieuws. De Amerikaanse overheid bespioneert iedereen die niet landgenoten of ingezetene van de VS is. Ons gedrag wordt per seconde geanalyseerd op een manier die noch wijzelf noch een geliefde ooit zou kunnen.
Dat dit mogelijk is, komt door de Patriot Act. Dat is Amerikaanse wetgeving die terreur moet tegengaan. Kennelijk vreest Obama u en mij meer dan zijn eigen ingezetenen. Dat de aanslagen in Boston, Oklahoma, Colorado en natuurlijk op 11 september 2001 door mensen van eigen bodem werden gepleegd, doet er kennelijk niet toe.
Als het verhaal van Obama klopt is niet duidelijk hoe hij een ingezetene wil scheiden van een niet-ingezetene. In de Verenigde Staten bestaat namelijk geen bevolkingsregister. Afgaande op de bron rond het spionageschandaal worden inderdaad ook profielen van landgenoten bijgehouden. Dus eigenlijk komt iedereen met maar een beetje digitaal leven wel in de systemen van de NSA voor.
Compleet beeldPRISM geeft de Amerikanen een griezelig compleet beeld van uw en mijn leven. Want nu is duidelijk dat via Facebook, Google, Microsoft, Apple, Dropbox en diverse andere bedrijven gedetailleerde informatie wordt geleverd. Of het nu gaat om de flirtpartij, het zakelijk conflict, de documenten die gemeenteraadsleden vertrouwelijk op hun iPad krijgen, religieuze of politieke overtuiging of een voor de VS onacceptabel contact: alles maar dan ook alles wordt bewaard.
En dat is alleen nog maar de input uit het PRISM-programma. Via National Security Letters wordt informatie gevorderd en ook daarvan weten wij niet welke gegevens of databases ons betreffen. Hoe die informatie kan worden ingezet valt te zien in de video van de bron voor het PRISM-verhaal Edward Snowden uitlegt hoe het systeem werkt en gebruikt kan worden. De duiding doet griezelig veel aan Stasi-praktijken denken, maar betreft echt 2013 en niet 1983.
EPDMaar waar de Stasi met de vingers niet zomaar aan onze medische dossiers kon komen, is dat voor de Amerikaanse overheid nog niet zo zeker. Het Elektronisch PatiĆ«ntendossier (EPD) wordt nog altijd aan elkaar geknoopt door het Amerikaanse bedrijf CSC. Dat bedrijf – overigens een oud-werkgever van me uit een grijs verleden ver voor de aanslagen van 2001 – zal gewoon moeten leveren als de NSA dat wil.
Maar misschien hoeven ze niet te leveren, want de onderneming blijkt wel hele fundamentele fouten te hebben gemaakt met beveiliging van andere gevoelige gegevens. Zo is de database met Deense rijbewijsgegevens gehackt, de database met Deense BSN-informatie, het IT-systeem van de Schengenzone en de e-mailaccounts pluswachtwoorden van 10.000 politieagenten en belastingmedewerkers.
Het boezemt geen vertrouwen in als een club zo met informatie van Europese burgers omgaat. Weer een voorbeeld waarom de huidige aanpak van het EPD geen gelukkige is. Mij lijkt een nerd van de The Pirate Bay minder bedreigend dan een Amerikaanse overheid die mijn gegevens langer dan ik leef bewaart. Maar met CSC krijg je kennelijk beide bedreigingen. Daarom wil ik niet in het EPD, maar die uitzondering zal ook wel weer in een PRISM-systeem worden opgeslagen.

http://www.hpdetijd.nl/2013-06-10/alleen-al-vanwege-prism-geen-epd/

Saturday, June 8, 2013

Council of the European Union Discusses Progress on the Proposed EU Data Protection Regulation

Council of the European Union Discusses Progress on the Proposed EU Data Protection Regulation

Council of the European Union Discusses Progress on the Proposed EU Data Protection Regulation

          
On June 6, 2013, the European Union’s Justice and Home Affairs Council held legislative deliberations regarding key issues concerning the European Commission’s proposed General Data Protection Regulation (the “Proposed Regulation”). The discussions were based on the Irish Presidency’s draft compromise text on Chapters I to IV of the Proposed Regulation, containing the fundamentals of the proposal and reflecting the Presidency’s view of the state of play of negotiations. At the Council meeting, the Presidency was seeking general support for the conclusions drawn in their draft compromise text on the key issues in Chapters I to IV.
Alan Shatter, Minister for Justice, Equality and Defense of Ireland, who chaired the meeting, noted the extensive work completed and progress made since the previous Council meeting on March 7-8, 2013. He emphasized the theme, later repeated by the EU Member States, “Nothing is agreed until everything is agreed,” to reiterate that the Presidency is seeking broad support for the approach. He also acknowledged that nothing can be settled conclusively at this stage.
Although most Member States broadly supported the general approach of the Presidency, there is still a need for further discussions and additional work on several key issues, including the risk-based approach and flexibility for the public sector. Additionally, some Member States (e.g., Germany, Denmark and the UK) found it premature to endorse the document since they do not support all of its conclusions.
Some of the main issues discussed during the deliberations included:
Legal Form
Some Member States still have reservations regarding the use of a regulation as the legal mechanism (according to the Presidency’s Note, Belgium, Czech Republic, Denmark, Estonia, Hungary, Sweden, Slovenia and UK).
Consent
Although some Member States supported the Presidency’s suggestion that consent should be “unambiguous,” several ministers emphasized their support for the Commission’s “explicit” consent requirement (France, Poland, Italy, Romania and Greece).
Risk-based Approach
Member States expressed their broad support for the risk-based approach, but noted that more work was needed, including on the definition of “risk” and the relevant factors to be taken into account when assessing risk.
EU Institutions, Agencies, Bodies and Offices
There is strong support for ensuring that the EU institutions, agencies, bodies and offices are subject to equivalent data protection rules, and that those rules come into effect as soon as possible. The Council’s Legal Service noted that – for reasons of sound drafting and legislation – provisions applicable to EU institutions should be put in a separate instrument, not in the Proposed Regulation.
Vice-President of the European Commission and Commissioner for Justice, Fundamental Rights and Citizenship Viviane Reding also addressed the Council and highlighted that the current level of protection as laid down in the EU Data Protection Directive 95/46/EC should not be undermined. The Presidency concurred.
Shatter noted that the Proposed Regulation will remain a priority for the final three weeks of the Irish Presidency, with several working group meetings already scheduled for June.
For more information on the Proposed Regulation, visit our EU Data Protection Regulation Tracker.

Tags: Belgium, Council of the European Union, Estonia, EU Members States, EU Regulation, European Commission, European Union, France, Germany, Hungary, International, Italy, Legislation, Poland, Slovenia, Sweden, United Kingdom, Viviane Reding