Friday, June 10, 2016

The Enterprising Researcher: Innovation, Entrepreneurship and University IP

Let's have a break from pure cryptography for a moment. Lift your head from the security proof you are trying to come up with, or from the poly-time factoring algorithm you are coding. Now look around: each object surrounding you has passed through a lot of stages before becoming the commercial product you stare at. There is also a good chance that many of them were once ideas in published research papers, probably similar to those we are all planning to write at some point. Papers not only carrying academic work but content that, through efforts and developments and visions, ended up being an object in our everyday life.

"The Enterprising Researcher: Innovation, Entrepreneurship and University IP" is a workshop I attended organised by Bristol Basecamp. It shed light on the process an idea needs to undergo to become a product and gave insights on the fact that the word "entrepreneurship" carries a stronger meaning than just "commercialising an idea" (valuable by itself). It suggests a sense of innovation and creation: like an artist who uses brushes to outline figures (and more importantly emotions), the entrepreneur combines resources and ideas to shape new markets and products (from which, most importantly, desires of people arise). This poetic point of view was particularly evident in the first talk.

Harry Destecroix and Laurent Chabanne are respectively CEO and CSO of Ziylo, a spin-off of the University of Bristol with expertise in continuous carbohydrate sensing technology. They shared their experience in bringing an academic idea to the market: successes, problems, obstacles and satisfactions are all part of the start-upper's life! Among all, I was impressed by how much passion and dedication they put in their work, hence I will often quote their exact own words to briefly describe their story, which is really worth listening to.

Their journey began with a scientific discovery (sugar-sensing platforms using synthetic receptors to isolate glucose-like structures) which was the outcome of research carried out by Professor Anthony Davis' research group at the University of Bristol. We are in the academic world for now, hence usual laws governing scientific publications still rule. Entering the market is different: first of all, it requires money. Since the idea was born in the university, the first source of help came from the inside. Research and Enterprise Development (RED) provides support and assists the growth of entrepreneurs from within the university. This is not just the step where you need money though, but it is also the phase during which awareness and information about business are vital. As they said, you need to "find complementary skill sets to yours", for instance in someone who's expert of marketing because "it costs a lot of money and time to write a business plan" (and it’s not something they teach you in school, I may add). Eventually, you need to "stop talking about tech and do marketing". I also enjoyed the human factor around this point, as they suggested to start these kinds of adventures with people you trust, with friends! It reminds us that start-ups as well as huge corporations are first of all human communities.

Another crucial point is that the trip is not easy. Now they are successfully working with SETsquared and Innovate UK, but raising funding was an issue to face and there might be moments in which the project seems to be failing: "you need to get used to the fact that you can lose your job at any time. If you’re not ok with that, don't bother". The important thing is to always have a positive attitude and to have faith in what you're doing, after all "without downs you don't know when you're up".

Funding is just one (although quite steep to climb) obstacle you might encounter in your way to the market. I would like to reference another one they mentioned as there is a very important entrepreneurship lesson to learn there. Being a company in biochemistry, they needed labs: expensive and dedicated structures, not the kind listed on Rightmove! Instead of coping with their specific problem, they identified a potential market and they (very recently) founded NS Science, a commercial real estate company focused on providing labs and science facilities to businesses. I would like to stress the moral about "being entrepreneur" laying behind this example: they didn't just commercialise a service, but they shaped the need of a community. Now that their company is around, other people who have similar issues may feel the desire to produce something new thanks to NS Science's facilities. Even better: NS Science may inspire other people who put aside their ideas because of a lack of spaces, for instance. Let me give a final (rather famous) example of the "needs/desires creation" aspect of entrepreneurship: did you need iPads before they were invented? What changed apart from the invention of iPads itself? I believe that, after scratching the surface of possible answers, the outcome could be incredibly surprising.

The second talk took a step back: how to publish research ideas and related legal aspects. Kathryn Smith, Research Engagement Librarian, focused on the importance of easily available research papers through green open access, that is to say repositories of manuscripts that differ from the published version (even just in the formatting, sometimes) so that they can be freely released. This is motivated by the fact that some entities may have restricted access to research outcomes (industry, public sector, charity foundations…) and that "you don't know who's out there: investors, new collaborators, people who could possibly develop your work in ways you hadn't even thought of". In our specific field, ePrint is an example of green open access. The University of Bristol also has its own green open access repository called Pure, whose team also checks for possible legal incompatibilities with the journals the paper is published in. In these regards, she pointed to a really useful search engine for manuscript publication policies of journals: SHERPA/RoMEO. For example, the picture shows the result of querying "LNCS", where being a "RoMEO green journal" means that you "can archive pre-print and post-print or publisher's version/PDF".

The third talk was also focused on legal aspects: Sue Sunstrom, Head of Commercialisation and Impact Development, answered several questions about Intellectual Property (IP) and how they relate to the university. First of all, there exist different kinds of IP (trademark, copyright, patent, trade secret, design...). They offer different features and are applicable to different (either concrete or abstract) objects. Since it can be quite expensive, choosing the right form of IP (hence the right form of protection) is crucial. But defence against competitors is not the only reason why IPs matter: investors like them because they are a proof you own something different and possibly innovative. They make the object they protect valuable in some situations (think of industrial secrets, for instance) and, as every form of value, they can be used as a currency in commercial trades. The interest of universities in IPs on the outcomes of research stems from various motivations: develop practical applications (hence have an impact on society), attract funding (for new research, hence possibly new IPs, entering a virtuous circle) and strengthen the link with industry are just few of them.

The last talk was given by Prof Alan Palmer on translational life science research, exemplified by the process of commercialising drugs. Such a topic is indeed strictly related to the biomedical field and is about academic and industrial efforts made in order to develop new solutions for prevention, diagnosis, and therapies. I am intentionally brief here, just have a look at Prof Palmer’s Linkedin profile to have a feeling of who an entrepreneur is!

Back to our beloved crypto, I think that this event has added a brick to my personal awareness (and I hope yours, after this reading) about what is going on out there, following what AvonCrypt had started. That was the perfect occasion in which to see how these realities exist in our field too (and I have the feeling it is particularly fertile). Thanks to this event, I understood what probably happened to those companies behind the scenes and I also found out another example (my bad I didn't know it before!): there is a start-up in Bristol called KETS which has recently won a prize and related funding for their usage of "quantum cryptography to improve data encryption, ensuring information is safe in all situations, from bank transactions to critical infrastructure, and to individuals shopping online from the comfort of their own home".

As Harry and Laurent said during their talk, "start-upping involves learning" so "take a book and read about business and economics": a suggestion I will certainly follow.


Marco
(Thanks to Matthias, Simon and Marie-Sarah for comments and corrections)

Monday, June 6, 2016

A visit to the National Museum of Computing in Bletchley Park

Last Friday, I went to the National Museum of Computing (TNMOC) in Bletchley Park, home of the British Government Code and Cypher School during World War II. It was hosting a special event to celebrate two new acquisitions: a Lorenz teleprinter recently found on eBay and a Lorenz SZ42 cipher machine on long-term loan from the Norwegian Armed Forces Museum. TNMOC now has all of the key parts (either original or rebuilt) used in the process of encryption, interception, and decryption of Lorenz messages sent by the German High Command during WWII. Five women of the WRNS (Women's Royal Navy Service, whose members are often called "wrens") who operated Colossus and the relatives of others who contributed to breaking Lorenz attended this special event.

John Whetter, one of the leaders of the team at TNMOC that rebuilt the British Tunny (in the background), holds a Spruchtafel, next to the Lorenz machine on loan from Norway.

The Lorenz cipher

The story of Lorenz, Bill Tutte, and Tommy Flowers is perhaps less well known than the story of Enigma and Alan Turing. The Enigma machine encrypted messages sent among units of the German army, navy, and air force. It had 3 or 4 rotors and operated directly on an alphabet of 26 letters, which were then transmitted in Morse code.

The Lorenz SZ42, on the other hand, was custom-built for the German High Command to send the most important strategic messages to its Field Marshals. It was more complex and less portable than an Enigma machine. The Lorenz cipher could handle letters, punctuation, and spacing: each character was encoded as 5 bits according to the Baudot code. The machine had 12 wheels, each with a number of cams (pins) on it. The numbers of cams on the wheels were co-prime. The "key" was in two parts: the starting position of each wheel ("wheel setting"), and the pattern of raised or lowered cams on each wheel ("wheel pattern"). The wheel settings were supposed to be changed for each message, while the wheel patterns were changed infrequently—for the first few years. When the wheel patterns did begin to change more frequently, however, Colossus II was operational and could find them.

The entire process of intercepting a message went roughly as follows.

1. Setting up to send the message

  • The sending operator in Berlin picks six pairs of letters at random from a prepared sheet.
  • He or she types them in to the teleprinter (without the Lorenz machine attached). The output is a paper tape with punched holes corresponding to the Baudot encoding of the letters.
  • Next, the operator uses a board of wheel settings (a Spruchtafel) to determine the starting position of the Lorenz SZ42's rotors. Each of the letters corresponds to a number.
Lorenz SZ40 (Tunny) Indicator Reading Board

German Lorenz operators consulted a Spruchtafel to determine which wheel settings (starting positions) to use based on a given 12-letter indicator. (source)

2. Encrypting and sending the message

  • Now, the teleprinter operator in Berlin hooks up the Lorenz encryption machine to the teleprinter and types the plaintext message.
  • The encrypted message is output on the same perforated paper tape, again encoded with the Baudot code.
  • The paper tape corresponding to the 12-letter indicator and the ciphertext is fed to a radio transmitter, which broadcasts it.

3. Intercepting the message

  • Radio receivers at an intercept station at Knockholt, Kent (south-east of London) pick up the encrypted message.
  • The faint signals are fed to an undulator, which uses an ink pen to record a continuous trace of the signal on a strip of paper tape, the "slip".
  • Slip readers (people, not machines) translate the highs and lows on the slip to characters according to the Baudot code. To minimize errors, two or more slip-readers read each transmission.
  • The characters are typed in to a perforator that produces another strip of paper upon which the characters are encoded in Baudot code.
  • The intercepted message is sent to Bletchley Park (100 km away) in two ways: by secure landline and by motorcycle courier.

4. Decrypting the message

  • The perforated tape is fed to Colossus, which outputs the most likely wheel settings (Colossus I) and wheel patterns (Colossus II onwards).

The input to the Colossus machine is perforated paper tape with characters in 5-bit Baudot code.

WWII-era cryptography vs. modern cryptography

I went to TNMOC with Thyla van der Merwe, another PhD student at Royal Holloway, to speak to the guests for a few minutes about cryptography today and how it works now compared to how it worked in the WWII era.

Thyla and Marie-Sarah next to TNMOC's rebuilt Colossus.

Thyla explained the benefits of using a stream cipher, like the Lorenz cipher—they're fast, they don't propagate ciphertext errors, and they require only small buffers. These properties made it appropriate for encrypting radio transmissions. She pointed out how ordinary citizens of the WWII era probably didn't use encryption, while today, it is ubiquitous: everyone who's been online or had a cell phone has used it.

I talked about what makes "modern" cryptography different. At the time of WWII, public-key cryptography had not yet been discovered, so sharing keys for any kind of symmetric protocol was still hard. Cryptography in that era also didn't have the precise definitions, clear assumptions, and rigorous security reductions we have today. (Katz and Lindell's textbook does a wonderful job of explaining these three features of modern cryptography.) Although these more formal aspects of modern cryptography are powerful, their strength in the real world is limited in two ways. First, they may not capture all of the information or capabilities an attacker may have (e.g., side-channel attacks). Second, and maybe even more importantly, they come with the assumption that protocols are implemented and used exactly as they should be.

For example, cryptographers know how important it is that a stream cipher (like the Lorenz cipher) never re-uses the same keystream for different messages, because the XOR of two ciphertexts would equal the XOR of the two plaintexts. If the two messages are similar, then keystream re-use is particularly dangerous. This mistake is exactly what led cryptanalysts at Bletchley Park to decrypt two long messages and obtain 4000 characters of keystream: in August 1941, a long message was retransmitted with a few minor changes, but with the same key settings. Within a few months, cryptanalyst John Tiltman had recovered the keystream. By January 1942, Bill Tutte had fully reverse-engineered the Lorenz machine... without ever having seen it!

The operator or implementer of a cryptographic protocol that uses a stream cipher may not understand how important it is that the keystream never be re-used, or may simply make a mistake. This type of mistake hasn't happened only in WWII. In the late 1990s, the IEEE 802.11 standard specified the WEP (Wired Equivalent Privacy) protocol for Wi-Fi networks. WEP uses the stream cipher RC4 to encrypt traffic from access points (wireless routers) to mobile stations (all devices wirelessly connected to the network). Partly due to the WEP protocol's design, and partly due to how the access points' keys tended to be managed in practice, the same RC4 keystream was frequently re-used in implementations. (The key supplied to RC4 was a concatenation of a 24-bit IV, sent in plaintext along with each encrypted message, and a 40-bit shared secret key, which was rarely changed.) Read more about WEP's shortcomings in Borisov, Goldberg, and Wagner's CCS 2001 paper.

Modern cryptography may offer many new tools, definitions, and rigorous proofs, but some things will never change: designing protocols that are secure in the real world is still really hard, and breaking cryptographic schemes still requires a great deal of creativity, analysis, and dedication.

More about the Lorenz story

Determining how the Lorenz machine worked was only the first step. Tommy Flowers, an engineer at the Post Office Research Station, designed and built an emulator, "Tunny," of the Lorenz machine. An entire section at Bletchley Park (the "Testery," named after the section head, Ralph Tester) was devoted to decrypting the messages—which they did by hand for the first 12 months. Max Newman and Tommy Flowers designed and built machines to speed up the decryption process: the "Heath Robinson" and "Colossus". Colossus was the first electronic digital machine that was programmable (with plugs and switches). Heath Robinson and Colossus were operated (and named, actually) by members of the WRNS.

Monday, May 16, 2016

EuroCrypt 2016 - a post about two talks

This post is about two interesting talks I attended at Eurocrypt 2016 in Vienna.

A well-structured talk has been given by Shota Yamada from the AIST (Japan), who presented two adaptive-secure Identity-Based Encryption schemes, both constructions being based on lattices. Identity-Based Encryption generalizes the public-key encryption paradigm by addressing the problem of simplifying the public-keys; it does this by storing some unique information about owner's identity: for instance, an email addresses or a phone number (referred to as identities).

In his paper, Yamada presents two adaptive-secure IBE constructions from lattices (we omit the details of construction). They follow the usual way of setting-up IBEs based on lattices. The secret-key corresponding to an identity ID of length $k$ is generated as $(A|H(ID)) \vec{e} = \vec{u}$ $mod$ $q$, where H maps the ID to a matrix of size $n \times m'$ and $A$ is $n \times m$. A ciphertext w.r.t. an ID includes $s^T(A|H(ID)) + (x_1^T|x_2^T)$. The novel part of Yamada's work is a technique allowing for improvement in the direction of reducing the size of the (master) public-key, based on which the function $H$ is computed. In a lattice based construction, one way to define it is: $H(ID) = B_0 + \sum_{i\in[1,k]\land ID_i=1} B_i$. The new idea uses the gadget matrix $G^{-1}$ and samples $2l = 2 \sqrt{k}$ matrices instead of $2k$; it also sets up $H(ID) = B_0 + \sum_{(i,j) \in S(ID)} B_{1,i} \cdot G^{-1}(B_{2,j})$, where $S$ is an injective map between IDs and $2^{[l] \times [l]}$. As a slide remark, one can further reduce the number of matrices from $O(k^{1/2})$ to $O(k^{1/d})$. In terms of efficiency, the size of the public parameters are $\tilde{O}(n^2 \cdot k^{1/d})$, therefore reducing the dimension of the master public key and allowing for faster encryption relative to an identity, while the size of the secret-key and ciphertexts have the same order of magnitude as the recent IBEs obtained from lattices.


Another noticeable presentation has been delivered by Igors Stepanovs (UCSD) about his joint work with Brent Waters and Mihir Bellare. The problem they tackled was the existence of differing-inputs obfuscation (diO). This work is related to the one of Garg, Gentry, Halevi and Wichs, who showed (Crypto 2014 paper) that the existence of "special purpose" obfuscation implies a negative result for the existence of diO.

In short, diO is a relaxation of indistinguishability obfuscation: while $iO$ asks that two obfuscated programs to be indistinguishable and produce the same results when evaluated at all inputs, the diO allows for inputs for which the two circuits are not equivalent (differing inputs), but it requires that it is computationally hard to find such inputs. The result of their work states that assuming sub-exponentially secure OWF, then we sub-exponentially secure diO for DTMs does not exist. A similar negative result for diO holds even if we assume that sub-exponentially secure iO exist.


These were just two interesting results, sampled from the set of "public-key" related talks, presented at EuroCrypt 2016.

Friday, May 13, 2016

EUROCRYPT 2016

I am writing this post on the plane, while coming back to Paris from Vienna, where I attended EUROCRYPT with a nice group of colleagues from ENS Paris. It was my first conference and really a magnificent experience: I am really glad I had the opportunity to spend some days attending interesting crypto talks, meeting new people, discussing possible new ideas and visiting such a beautiful city.

As I said, we had the opportunity to listen to many interesting talks, some of which were given by PhD students. In particular I would like to cite three talks, which were given by my labmates Romain Gay, Pierrick Méaux and Adrian Thillard. Pierrick talked about stream ciphers for FHE and how to get fully homomorphic encryption closer to practical efficiency (link). Adrian presented a joint work with other labmates of ours about randomness complexity and the d-probing model (link). And last, Romain presented a joint work with Hoeteck Wee (that I am privileged to have as one of my supervisors),  Dennis Hofheinz and Eike Kiltz about "tightly CCA-secure encryption without pairings" (link) which won the best paper award! The awarding ceremony took place during the cocktail organized for the participants at Vienna's town hall, where we were hosted by the mayor in the impressive Feestsaal of the Rathaus palace.

It was also a particularly special conference for me and my colleagues Florian and Rafael because it came just after being notified that the paper we wrote together with (and under the supervision of) Hoeteck has been accepted to CRYPTO 2016. The paper is about a new technique to achieve circuit privacy for fully homomorphic encryption and it is available here.
The satisfaction of publishing a paper (which for me is the first) is something really amazing and it surely rewards all of us for all the work we put in writing it! As icing on the cake, my advisor suggested that I should give a mini-talk at EUROCRYPT's rump session: even if it was short and given during an informal event such as a rump session, I really enjoyed myself. I would also like to thank all my labmates that were sitting in the first rows of the hall to cheer and clap! :)

Another really enjoyable moment was the official dinner, that was organized at Weingut Fuhrgassl-Huber, just outside of the city, where we had delicious pork meat, fried vegetables, wine and desserts, plus music and the opportunity to get together and meet new people.

In the end I would like to congratulate and sincerely thank all the organizers, the program chairs, the session chairs, and everyone who made EUROCRYPT 2016 possible and so nice. Great job!
Next year, EUROCRYPT will be in Paris and I am already looking forward to it. Safe travel home to everyone and see you soon!


And here is a nice picture of a part of the ENS team enjoying a delicious pizza at an Italian restaurant.




On the left: Michele Minelli, Geoffroy Couteau, Florian Bourse, Aurelien Dupin, Romain Gay, Pierrick Meaux

On the right: Jeremy Chotard, Pierre-Alain Dupont, Remi Geraud, Dahmun Goudarzi, Rafael Del Pino, Adrian Thillard

Monday, May 9, 2016

Grias eich in Wien!

Grias eich in Wien!

I'm glad to see many of my ECRYPT-NET fellows in Vienna, the city I finished my Master's program in, these days. Apart from EUROCRYPT, this working week actually already started on Sunday with "A Workshop About Cryptographic Standards" where questions like "How can we establish confidence in cryptographic standards?" were dealt with

The conference will be followed by a workshop about cryptographic protocols for small devices" on Friday.

So, let's dive into one of the 3 main annual crypto conferences of the IACR, where researchers present their recent results in both theoretical and applied cryptography... and stay tuned for posts, comments about our experiences at these events!

Until then, maybe you use the chance to explore Vienna after the numerous talks. Inspired as in Marie-Sarah's blog-post, here are a few phrases presented in the locally spoken "Austrian German" dialect in ascending difficulty and descending relevance for the daily life in the city. For help with the correct pronunciation feel free to approach us - Ralph and me - the two Austrian ECRYPT-NET fellows.

English German Austrian (aka proper German)
Hi, Hello Hi, Hallo Grias di, Servus
Good night Gute Nacht Guade Nocht
Goodbye Auf Wiedersehen Pfiad di
How's it going? Wie geht's? Oida?
What's up? What's happening? Was geht? Oida!
Yes Ja Jo
No Nein Na
Please Bitte Bitt sche
Thank you Danke Daung sche
1 one eins oans
2 two zwei zwoa
3 three drei drei
4 four vier vier
5 five fünf fünf
6 six sechs seggs
7 seven sieben siebm
8 eight acht ocht
9 nine neun nei
10 ten zehn zehn
You're welcome Bitte schön, gerne Setz di her scheid da a Brot owa, nimm da a G'söchts
Sorry Entschuldigung Tuat ma lad
Sorry, I do not understand you Wie Bitte? Wos is?
What is your name? Wie heißen Sie? (formal)
Wie heißt du? (informal)
Wie haßt'n du? (informal)
My name is... Ich heiße... I bin da/die ...
Where are you from? Von wo sind Sie? (formal)
Von wo bist du? Wo kommst du her? (informal)
Wo kimmstn du her? (informal)
I am from... Ich bin aus... I bin aus...
You look beautiful Du siehst hübsch aus. Schnitzerl!
Do you speak English? Sprechen Sie Englisch? (formal)
Sprichst du Englisch? (informal)
Red'st du Englisch?
Where is (the bathroom)?
(the train station)?
Wo ist (die Toilette)?
(die Zugstation)?
Wo isn's Heisl?
(da Baunhof)
Let's go! Los geht's! Geh mas on!
Cool! Cool! Leiwand!
Bon appétit! Mahlzeit! Mohlzeit!
A schnitzel and a beer, please Ein Schnitzel und ein Bier, bitte S'ansa Menü, bitte.
Cheers! Prost! (Zum Wohl!) Zaum, zaum, zaum, zaum: Prooost!
Check, please Zahlen bitte (Die Rechnung bitte) Zohln/Zoin, bitt schen!
How is the weather tomorrow? Könnten Sie mir bitte Ihre Kenntnis der Wettervorhersage mitteilen? Wie wird'n s'Weda?
Leave me alone. Seriously! Lassen Sie mich in Ruhe. Hau' ab! Loss mi ång'lahnt. Wüst a Gnackwatschn?
How to order a traditional (midnight-) snack: Hotdog & beer, fast. Einen Käsekrainerhotdog, ein Endstück Brot und eine Dose Ottakringer (16.Bezirk) Bier bitte. Zeitnah - wenn Sie so gnädig wären! A Eitrige im Präserl, an Buggl und an 16er-Blech. Oba Jennifer!

Good luck! ... und pfiat eich!

Sunday, April 17, 2016

Inherent leakage-resiliency of LWE

MathJax TeX Test Page

Why we care about post-quantum cryptography should be clear by now (if it’s not, you’re in the right place anyway: you just need to take a step back and read this splendidly packaged blog post). A mathematical notion that is having much success in achieving it is the Learning With Errors (LWE) problem (guess what, we've also talked about that here). Thanks to some mathematical evidences, we are quite confident about its hardness so that many cryptographic primitives whose security is based on it have arisen. That said, let’s take a step further and imagine a future (not that far in time) when all those primitives are standardised and deployed at many levels, including hardware security. Our experience with classic algorithms teaches us that we shouldn't be too confident of the security of an implementation given the security of the scheme on paper, and post-quantum cryptography is no exception. In fact, side-channel attacks are known to be a great threat to cryptographic implementations. The question this blog post wishes to partially answer is: how can we secure our (future) post-quantum implementations?

Playing cops and robbers is a way, of course: applying common techniques (e.g. masking, randomisation, …) against known side-channel attacks is possible just by fixing the design of specific schemes. However, this approach has at least a couple of drawbacks:

  1. a protection is not guaranteed to thwart future attacks (sometime new attacks are specifically designed to circumvent a countermeasure). More generally, a countermeasure doesn't protect against anything outside what it was designed to protect against;
  2. usual countermeasures introduce overhead (in terms of whatever metric you prefer, e.g. area, time, ...). This results in a protected scheme to be less efficient than its unprotected version.

Leakage-resilient cryptography is a possible alternative: a cryptographic scheme is provably secure even in the case of some anticipated amount of leakage, by design. Usually such proofs only rely on a bounded amount of leakage that the scheme can tolerate. The main idea sounds like the following statement.

We build a cryptographic scheme which retains security even if a bounded amount of arbitrary information is leaked.

Full stop. There aren't many other assumptions: this fact gives leakage-resilient cryptography enough generality to capture many, if not all, side-channel attacks. In essence, we are assuming that the scheme is secure if leakage occurs, no matter how that is exploited by an attacker. This seems to address the first drawback of ad-hoc countermeasures, provided everything is implemented in the proper manner. Is there anything we can do about the second drawback?

If we keep thinking of securing a scheme, then answering to that question is really difficult. Indeed a countermeasure, even the most general and provable one, introduces some changes in the original design which necessarily result in a overhead, for the simple reason that they take into account a more powerful adversary, namely one who is able of measuring and exploiting leakage too. However, think of the case in which none of the anticipated amount of leakage actually occurs. Then we end up having a less efficient implementation, the protected one, which doesn't provide any additional security because, without leakage, the original scheme was secure anyway. Eventually, stop thinking of securing a scheme and start thinking of securing an assumption.

In their paper, Goldwasser, Kalai, Peikert and Vaikuntanathan show that LWE has the nice feature of being hard even in the presence of leakage. Does it sound like what we've just said? Essentially yes, but with a great difference: they're not building a leakage-resilient scheme, hence introducing some sort of overhead, but proving the leakage-resiliency of an assumption. This makes a big difference, because the former implies that the efficiency degrades to let leakage-resiliency grow, while the latter implies that security, not efficiency, degrades. In particular, their proof establishes a relation between the security level and the amount of leakage in such a way that we don't need to anticipate a maximum tolerable amount of it. The straightforward consequence is that a scheme based on LWE is secure independently on whether the leakage occurs or not, with the advantage that in the latter case we have not introduced any protection-related overhead in the design. As a result, they propose a symmetric-key encryption scheme being secure even in the presence of leakage (with some caveats): the novelty relies on the fact that you won't find any parameter describing an amount of leakage (usually called $\lambda$ in the literature of leakage-resilient cryptography).

We omit any technicality here as this would like to be a generic and accessible reading. For further details on how the authors achieved this result, we refer to their paper. Instead, it you prefer to have just a mathematical flavour without going into too many details, you may like this post from the Bristol cryptography group's blog. Stay tuned for more insights on post-quantum cryptography!

P.S.: the word "leakage" appears 19 times in this text. If you're tired of reading it, watch this.

Marco (Thanks to Simon and Matthias for some corrections!)

Friday, April 15, 2016

Mobile messenger security...could it be any worse?

Recently, a prominent court case has led to a lot more people noticing the fact that BBM (Blackberry Messenger) apparently uses a symmetric cipher (3DES) with one key for everybody.
This seems to be old news, it is e.g. mentioned in this forum post from 2014. Indeed the investigation for that court case ran between 2010 and 2012. But it has now received a bit more attention.

Now I hope you agree that a globally shared symmetric key basically provides no secrecy at all. Indeed even a berryreview.com article from 2010 states:
BlackBerry Messenger and PIN to PIN messages are NOT encrypted. They are scrambled using a global cryptographic key which EVERY BlackBerry in the world uses.
(emphasis in the original)

Drawing comparisons is difficult. E-mail is insecure but often at least the connections are encrypted. SMS is hopefully encrypted with A5/X of GSM (including its security problems). Still both are usually visible to the network operator or service provider.

So how can we do better?
For Android, iOS and now as a Chrome browser extension, there is Signal. Which is also used by many of the ECRYPT fellows. The signal protocol, formerly known as axolotl has also recently been adopted for the new encryption in WhatsApp. Signal is still to be preferred however, since it is open source, has reproducible builds and there is no Facebook behind it to correlate the metadata to. While neither Signal nor WhatsApp hide metadata, the encryption seems to be solid.

So let's say you get rid of your Blackberry with BBM and get an Android phone with Signal instead? How's your security?
Unfortunately Android has a systematic problem with security updates.
Consider this devastating graph from androidvulnerabilities.org. Even ignoring details about how the collected their data which would probably cause a bias towards being too optimistic, it shows that almost all Android devices are susceptible to a known vulnerability. (For obvious reasons unknown vulnerabilities are not included.)

There are some interesting projects trying to improve the situation, for example CopperheadOS or the Guardian Project (who have teamed up with f-droid in an attempt to provide a true open-source ecosystem). It does however look like a really good solution is still some time away.

But for end-to-end encryption Signal looks like an excellent choice.