Sunday, March 10, 2013

Charm Design Principles


It has been over a year since my last post. I blame the academic life! I will try to keep my blog more up-to-date, and perhaps, use it as a way to document how to use Charm and some of the features we are planning for this year and beyond. But first, some background on the purpose of Charm.

Charm is the beginning of what I hope to be a paradigm shift in how the academics and system engineers of the world approach the development of modern cryptography. This is because Charm doesn’t require sophisticated programming skills to realize the implementation of complex yet useful crypto algorithms. 
It decouples gory implementation bits from the algorithmic details of crypto. Charm allows experts and non-experts to think about these constructs in terms of how they were written in the research papers. Basically, it represents a one-stop-shop approach to understand a scheme, implement it, and run it without needing to install extra software. 

More importantly, Charm benefits the research and systems community by providing a test bed and rapid prototyping environment for advanced crypto (e.g., more than just integer factoring and number theory). We do the hard work once (or a few times) so others can worry about the idea they want to implement. Moreover, the Charm code literally can run anywhere (and yes, even on Android). The hope is that Charm becomes the MATLAB for today’s cryptography. It enables the evaluation of new crypto in the hopes of facilitating the technology transfer of crypto from research to industry. Realizing this goal is central to being able to utilize the recent advances in theoretical crypto (e.g., computing and searching on encrypted data) in the real world.

One of the salient features of Charm is its ability to provide a developer-friendly environment to implement cryptography at a high-level. In general, when developing a crypto library, there are many issues outside the crypto scheme(s) that one must take into consideration. Which programming language? What kind of API or interface is required by users? What type of data structure for storing public/private keys and ciphertexts? Serialization methodology for transmission of those structures? 


These are the kind of issues that make the engineering time consuming and tedious, not to mention error-prone (e.g., due to poor interface design). In addition, this is separate from the headaches that come with implementing the crypto scheme itself. This is usually a non-trivial exercise that requires understanding of the underlying mathematics and theory involved in implementing it correctly. 

Assuming the proof of security for the scheme is free of errors, mistakes can easily be made as one transitions from the theoretical description to an implementation. But, in the end, these mistakes can turn into devastating flaws that make the resulting library useless. The ultimate goal of Charm is to lower the barriers for developing crypto by providing reusable building blocks and focusing the (time constrained) energies of researchers and developers on the algorithmic details of a scheme in a high-level programming language. Then, the other necessary bits like serialization of keys and ciphertexts are provided without any additional work. 

Implementing a crypto algorithm in Charm only requires three things: 1. a basic understanding of Python which is really easy to learn by the way, 2. the ability to understand the mathematical notation used in the research paper to describe the scheme, and 3. a willingness to try a new approach to develop crypto. Our goal is to make Charm a platform that anyone can use to further their own research agendas -- free of charge.

If you want more details, we have a somewhat dated tech report about the framework available here and a published research paper appeared in the second issue of the Journal of Cryptographic Engineering (DOI: 10.1007/s13389-013-0057-3, Vol: 3, Issue: 2, page 111-128).

No comments:

Post a Comment